forked from TauCetiStation/TauCetiClassic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'TauCetiStation:master' into master
- Loading branch information
Showing
72 changed files
with
10,481 additions
and
9,861 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/// A wrapper for _create_spawners that allows us to pretend we're using normal named arguments | ||
#define create_spawners(type, num, arguments...) _create_spawners(type, num, list(##arguments)) | ||
|
||
#define create_spawner(type, arguments...) create_spawners(type, 1, ##arguments) | ||
#define create_spawner(type, arguments...) _create_spawners(type, 1, list(##arguments)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
//For these defines, check also above for their actual shapes in-game and maybe get a better idea | ||
|
||
///Default shape. It's one tile above the atom | ||
#define SEE_THROUGH_MAP_DEFAULT "default" | ||
///A 3x3 area 2 tiles above the atom (trees love to be this shape) | ||
#define SEE_THROUGH_MAP_THREE_X_THREE "3x3" | ||
///2 tiles above the atom | ||
#define SEE_THROUGH_MAP_DEFAULT_TWO_TALL "default_two_tall" | ||
///two rows of three tiles above the atom (small but thick trees love these) | ||
#define SEE_THROUGH_MAP_THREE_X_TWO "3x2" | ||
|
||
/**global statics for the see_through_component coordinate maps | ||
* For ease of use, include a comment in the shape of the coordinate map, where O is nothing, X is a hidden tile and A is the object | ||
* List-coordinate layout is list(relative_x, relative_y, relative_z) | ||
* Turf finding algorithm needs the z and you can totally use it, but I can't think of any reason to ever do it | ||
* Also it'd be really cool if you could keep the list-coordinates in here represent their actual relative coords, dont use tabs though since their spacing can differ | ||
*/ | ||
var/global/list/see_through_maps = list( | ||
// X | ||
// A | ||
SEE_THROUGH_MAP_DEFAULT = list( | ||
/*----------------*/list(0, 1, 0), | ||
/*----------------*/list(0, 0, 0) | ||
), | ||
|
||
// XXX | ||
// XXX | ||
// XXX | ||
// OAO | ||
SEE_THROUGH_MAP_THREE_X_THREE = list( | ||
list(-1, 3, 0), list(0, 3, 0), list(1, 3, 0), | ||
list(-1, 2, 0), list(0, 2, 0), list(1, 2, 0), | ||
list(-1, 1, 0), list(0, 1, 0), list(1, 1, 0) | ||
), | ||
|
||
// X | ||
// X | ||
// A | ||
SEE_THROUGH_MAP_DEFAULT_TWO_TALL = list( | ||
/*----------------*/list(0, 2, 0), | ||
/*----------------*/list(0, 1, 0), | ||
/*----------------*/list(0, 0, 0) | ||
), | ||
|
||
// XXX | ||
// XXX | ||
// OAO | ||
SEE_THROUGH_MAP_THREE_X_TWO = list( | ||
list(-1, 2, 0), list(0, 2, 0), list(1, 2, 0), | ||
list(-1, 1, 0), list(0, 1, 0), list(1, 1, 0) | ||
), | ||
|
||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/datum/component/fishing | ||
var/list/catchable_things | ||
var/catch_time | ||
var/catchable_things_amount | ||
var/catch_chance | ||
|
||
/datum/component/fishing/Initialize(catchable_things, catch_time = 5 SECONDS, catchable_things_amount = 15, catch_chance = 50) | ||
src.catchable_things = catchable_things | ||
src.catch_time = catch_time | ||
src.catchable_things_amount = catchable_things_amount | ||
src.catch_chance = catch_chance | ||
|
||
RegisterSignal(parent, list(COMSIG_PARENT_ATTACKBY), PROC_REF(try_catch)) | ||
|
||
/datum/component/fishing/proc/try_catch(datum/source, obj/item/I, mob/living/user) | ||
SIGNAL_HANDLER | ||
|
||
if(istype(I, /obj/item/weapon/wirerod) && !user.is_busy()) | ||
INVOKE_ASYNC(src, PROC_REF(start_fishing), I, user) | ||
return COMPONENT_NO_AFTERATTACK | ||
|
||
/datum/component/fishing/proc/start_fishing(obj/item/I, mob/living/user) | ||
var/atom/A = parent | ||
if(catchable_things_amount < 3) | ||
to_chat(user, "<span class='warning'>Looks like there is almost no things left in this location.</span>") | ||
A.visible_message("<span class='notice'>[user] starts fishing.</span>") | ||
if(!do_after(user, catch_time, target = A)) | ||
A.visible_message("<span class='notice'>[user] stops fishing.</span>") | ||
return | ||
if(!prob(catch_chance)) | ||
A.visible_message("<span class='notice'>[user] fails to catch anything.</span>") | ||
return | ||
if(!catchable_things_amount) | ||
to_chat(user, "<span class='warning'>No things left here, time to change location.</span>") | ||
return | ||
catchable_things_amount-- | ||
var/catchable_path = pickweight(catchable_things) | ||
var/thing = new catchable_path(get_turf(A), get_step(user, get_dir(A, user))) | ||
A.visible_message("<span class='notice'>[user] has caught [thing].</span>") |
Oops, something went wrong.