diff --git a/_maps/map_files/Birdshot/birdshot.dmm b/_maps/map_files/Birdshot/birdshot.dmm index fbc4f6b366c..3a8d2762e2e 100644 --- a/_maps/map_files/Birdshot/birdshot.dmm +++ b/_maps/map_files/Birdshot/birdshot.dmm @@ -5717,6 +5717,15 @@ /mob/living/simple_animal/hostile/asteroid/lobstrosity, /turf/open/misc/asteroid/airless, /area/station/engineering/supermatter/room) +"cwt" = ( +/obj/structure/table/reinforced, +/obj/machinery/door/firedoor, +/obj/item/folder/red, +/obj/machinery/door/window/brigdoor/left/directional/north{ + req_access = list("security") + }, +/turf/open/floor/iron/textured_large, +/area/station/security/checkpoint/customs) "cwC" = ( /obj/structure/cable, /obj/machinery/atmospherics/pipe/smart/simple/dark/visible, @@ -7056,19 +7065,6 @@ dir = 4 }, /area/station/maintenance/fore/lesser) -"cWn" = ( -/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, -/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, -/obj/structure/table/reinforced, -/obj/machinery/door/poddoor/shutters/preopen{ - dir = 4; - id = "kitchenshutters"; - name = "Kitchen Shutters" - }, -/obj/item/plate, -/obj/item/food/peanut_butter_jelly_sandwich, -/turf/open/floor/iron/cafeteria, -/area/station/service/kitchen) "cWo" = ( /obj/structure/cable, /obj/structure/disposalpipe/segment{ @@ -7382,16 +7378,6 @@ /obj/effect/turf_decal/tile/blue, /turf/open/floor/iron/white, /area/station/medical/medbay/central) -"dcO" = ( -/obj/machinery/door/firedoor, -/obj/machinery/door/airlock/security/glass{ - id_tag = "outerbrig"; - name = "Brig Cells" - }, -/obj/structure/disposalpipe/segment, -/obj/effect/mapping_helpers/airlock/access/all/security/entrance, -/turf/open/floor/iron/textured_half, -/area/station/security/brig) "ddd" = ( /obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, /obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, @@ -7883,21 +7869,6 @@ }, /turf/open/floor/plating, /area/station/maintenance/disposal/incinerator) -"dmS" = ( -/obj/structure/disposalpipe/segment{ - dir = 4 - }, -/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, -/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, -/obj/machinery/door/airlock/mining/glass{ - name = "Cargo Office" - }, -/obj/effect/mapping_helpers/airlock/access/all/supply/general, -/obj/machinery/door/firedoor, -/turf/open/floor/iron/stairs{ - dir = 4 - }, -/area/station/cargo/office) "dmT" = ( /obj/machinery/camera/directional/north{ c_tag = "Xenobiology - Cell 2"; @@ -13514,6 +13485,12 @@ }, /turf/open/floor/iron, /area/station/hallway/primary/central/fore) +"frP" = ( +/obj/structure/table/reinforced, +/obj/machinery/door/firedoor, +/obj/machinery/door/window/brigdoor/right/directional/north, +/turf/open/floor/iron/textured_large, +/area/station/security/checkpoint/customs) "fsf" = ( /obj/structure/table/reinforced/titaniumglass, /obj/structure/railing{ @@ -16398,17 +16375,6 @@ /obj/effect/spawner/random/trash, /turf/open/floor/plating, /area/station/maintenance/port/aft) -"gqo" = ( -/obj/structure/table/reinforced, -/obj/machinery/door/poddoor/shutters/preopen{ - dir = 4; - id = "kitchenshutters"; - name = "Kitchen Shutters" - }, -/obj/item/plate, -/obj/item/food/peanut_butter_jelly_sandwich, -/turf/open/floor/iron/cafeteria, -/area/station/service/kitchen) "gqs" = ( /obj/effect/turf_decal/trimline/blue/filled/line{ dir = 10 @@ -19605,6 +19571,19 @@ /obj/machinery/door/firedoor, /turf/open/floor/iron/small, /area/station/hallway/primary/fore) +"hsA" = ( +/obj/structure/disposalpipe/segment{ + dir = 9 + }, +/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, +/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, +/obj/effect/turf_decal/siding/white{ + dir = 9 + }, +/obj/machinery/door/airlock/medical/glass, +/obj/effect/mapping_helpers/airlock/access/all/medical/coroner, +/turf/open/floor/iron/small, +/area/station/medical/morgue) "hsC" = ( /obj/structure/cable, /obj/effect/turf_decal/tile/neutral/fourcorners, @@ -22481,15 +22460,6 @@ dir = 1 }, /area/station/command/gateway) -"isR" = ( -/obj/machinery/door/firedoor, -/obj/effect/mapping_helpers/airlock/access/any/security/general, -/obj/machinery/door/airlock/security{ - name = "Courtroom" - }, -/obj/effect/mapping_helpers/airlock/access/any/security/court, -/turf/open/floor/plating, -/area/station/security/courtroom) "isV" = ( /obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, /obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, @@ -25278,12 +25248,6 @@ /obj/structure/closet/firecloset, /turf/open/floor/plating/rust, /area/station/maintenance/fore/lesser) -"jrO" = ( -/obj/structure/table/reinforced, -/obj/machinery/door/firedoor, -/obj/machinery/door/window/brigdoor/right/directional/north, -/turf/open/floor/iron/textured_large, -/area/station/security/checkpoint/customs) "jrT" = ( /obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, /obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, @@ -26264,6 +26228,21 @@ /obj/machinery/light/small/directional/north, /turf/open/floor/iron, /area/station/science/xenobiology) +"jKu" = ( +/obj/structure/disposalpipe/segment{ + dir = 4 + }, +/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, +/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, +/obj/machinery/door/airlock/mining/glass{ + name = "Cargo Office" + }, +/obj/effect/mapping_helpers/airlock/access/all/supply/general, +/obj/machinery/door/firedoor, +/turf/open/floor/iron/stairs{ + dir = 4 + }, +/area/station/cargo/office) "jKJ" = ( /obj/machinery/door/window/right/directional/north, /turf/open/floor/iron, @@ -30055,14 +30034,6 @@ /obj/effect/mapping_helpers/airlock/unres, /turf/open/floor/plating, /area/station/maintenance/central/greater) -"lcc" = ( -/obj/effect/mapping_helpers/airlock/access/any/security/general, -/obj/machinery/door/airlock/security{ - name = "Courtroom" - }, -/obj/effect/mapping_helpers/airlock/access/any/security/court, -/turf/open/floor/plating, -/area/station/maintenance/central/lesser) "lce" = ( /obj/machinery/atmospherics/pipe/smart/simple/general/visible{ dir = 9 @@ -31637,17 +31608,6 @@ /obj/structure/falsewall, /turf/open/floor/plating, /area/station/maintenance/aft) -"lCS" = ( -/obj/structure/cable, -/obj/structure/disposalpipe/segment{ - dir = 4 - }, -/obj/machinery/door/airlock/maintenance{ - name = "Vacant Office Maintenance" - }, -/obj/effect/mapping_helpers/airlock/access/all/medical/coroner, -/turf/open/floor/plating, -/area/station/medical/morgue) "lCV" = ( /obj/structure/urinal/directional/west, /obj/effect/decal/cleanable/dirt/dust, @@ -34296,18 +34256,6 @@ /obj/item/kirbyplants/fullysynthetic, /turf/open/floor/iron, /area/station/security/processing) -"myK" = ( -/obj/structure/cable, -/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, -/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, -/obj/machinery/door/airlock/security/glass{ - id_tag = "outerbrig"; - name = "Brig Cells" - }, -/obj/machinery/door/firedoor, -/obj/effect/mapping_helpers/airlock/access/all/security/entrance, -/turf/open/floor/iron/textured_half, -/area/station/security/brig) "myM" = ( /obj/structure/window/spawner/directional/north, /obj/structure/window/spawner/directional/south, @@ -36115,15 +36063,6 @@ /obj/effect/decal/cleanable/dirt/dust, /turf/open/floor/iron, /area/station/commons/dorms) -"ngx" = ( -/obj/structure/table/reinforced, -/obj/machinery/door/firedoor, -/obj/item/folder/red, -/obj/machinery/door/window/brigdoor/left/directional/north{ - req_access = list("security") - }, -/turf/open/floor/iron/textured_large, -/area/station/security/checkpoint/customs) "ngL" = ( /obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, /obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, @@ -37202,19 +37141,6 @@ /obj/effect/decal/cleanable/dirt/dust, /turf/open/floor/iron/white, /area/station/commons/dorms) -"nAX" = ( -/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, -/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, -/obj/machinery/door/firedoor, -/obj/machinery/door/airlock/public/glass{ - name = "Courtroom" - }, -/obj/effect/mapping_helpers/airlock/access/any/security/general, -/obj/effect/mapping_helpers/airlock/access/any/security/court, -/turf/open/floor/iron/dark/textured_half{ - dir = 1 - }, -/area/station/security/courtroom) "nBo" = ( /obj/effect/decal/cleanable/dirt/dust, /obj/structure/disposalpipe/segment{ @@ -38751,6 +38677,19 @@ }, /turf/open/floor/iron/smooth_large, /area/station/maintenance/department/medical/central) +"ofv" = ( +/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, +/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, +/obj/structure/table/reinforced, +/obj/machinery/door/poddoor/shutters/preopen{ + dir = 4; + id = "kitchenshutters"; + name = "Kitchen Shutters" + }, +/obj/item/plate, +/obj/item/food/peanut_butter_jelly_sandwich, +/turf/open/floor/iron/cafeteria, +/area/station/service/kitchen) "ofG" = ( /obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, /obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, @@ -39897,6 +39836,16 @@ /obj/effect/decal/cleanable/dirt/dust, /turf/open/floor/plating, /area/station/maintenance/hallway/abandoned_command) +"oAY" = ( +/obj/machinery/door/firedoor, +/obj/machinery/door/airlock/security/glass{ + id_tag = "outerbrig"; + name = "Brig Cells" + }, +/obj/structure/disposalpipe/segment, +/obj/effect/mapping_helpers/airlock/access/all/security/entrance, +/turf/open/floor/iron/textured_half, +/area/station/security/brig) "oBm" = ( /obj/structure/chair/sofa/bench/left, /obj/effect/turf_decal/tile/neutral/fourcorners, @@ -42616,6 +42565,17 @@ "pyt" = ( /turf/open/floor/plating, /area/station/service/library/abandoned) +"pyI" = ( +/obj/structure/cable, +/obj/structure/disposalpipe/segment{ + dir = 4 + }, +/obj/machinery/door/airlock/maintenance{ + name = "Vacant Office Maintenance" + }, +/obj/effect/mapping_helpers/airlock/access/all/medical/coroner, +/turf/open/floor/plating, +/area/station/medical/morgue) "pyS" = ( /obj/structure/chair/sofa/left/maroon, /obj/effect/landmark/start/assistant, @@ -45641,6 +45601,17 @@ }, /turf/open/floor/iron/dark/small, /area/station/maintenance/aft) +"quI" = ( +/obj/structure/table/reinforced, +/obj/machinery/door/poddoor/shutters/preopen{ + dir = 4; + id = "kitchenshutters"; + name = "Kitchen Shutters" + }, +/obj/item/plate, +/obj/item/food/peanut_butter_jelly_sandwich, +/turf/open/floor/iron/cafeteria, +/area/station/service/kitchen) "quQ" = ( /obj/effect/turf_decal/stripes/white/line{ dir = 4 @@ -50168,6 +50139,19 @@ dir = 1 }, /area/station/hallway/secondary/exit/departure_lounge) +"rRf" = ( +/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, +/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, +/obj/machinery/door/firedoor, +/obj/machinery/door/airlock/public/glass{ + name = "Courtroom" + }, +/obj/effect/mapping_helpers/airlock/access/any/security/general, +/obj/effect/mapping_helpers/airlock/access/any/security/court, +/turf/open/floor/iron/dark/textured_half{ + dir = 1 + }, +/area/station/security/courtroom) "rRn" = ( /obj/structure/lattice, /obj/structure/window/reinforced/spawner/directional/west, @@ -50272,19 +50256,6 @@ }, /turf/open/floor/iron/dark, /area/station/service/lawoffice) -"rSt" = ( -/obj/structure/disposalpipe/segment{ - dir = 9 - }, -/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, -/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, -/obj/effect/turf_decal/siding/white{ - dir = 9 - }, -/obj/machinery/door/airlock/medical/glass, -/obj/effect/mapping_helpers/airlock/access/all/medical/coroner, -/turf/open/floor/iron/small, -/area/station/medical/morgue) "rSw" = ( /obj/machinery/vending/cigarette, /obj/effect/turf_decal/stripes/line{ @@ -51671,6 +51642,14 @@ /obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, /turf/open/floor/iron/smooth, /area/station/hallway/secondary/command) +"spg" = ( +/obj/effect/mapping_helpers/airlock/access/any/security/general, +/obj/machinery/door/airlock/security{ + name = "Courtroom" + }, +/obj/effect/mapping_helpers/airlock/access/any/security/court, +/turf/open/floor/plating, +/area/station/maintenance/central/lesser) "spi" = ( /obj/structure/chair{ pixel_y = -2 @@ -52169,17 +52148,6 @@ /obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, /turf/open/floor/iron/dark, /area/station/medical/medbay/central) -"swO" = ( -/obj/structure/disposalpipe/segment{ - dir = 4 - }, -/obj/structure/window/spawner/directional/east, -/obj/structure/window/spawner/directional/north, -/mob/living/simple_animal/chick{ - name = "Morgan" - }, -/turf/open/floor/grass, -/area/station/cargo/storage) "sxm" = ( /turf/closed/wall, /area/station/tcommsat/server) @@ -62086,6 +62054,17 @@ /obj/effect/landmark/start/clown, /turf/open/floor/iron/smooth, /area/station/service/greenroom) +"vGk" = ( +/obj/structure/disposalpipe/segment{ + dir = 4 + }, +/obj/structure/window/spawner/directional/east, +/obj/structure/window/spawner/directional/north, +/mob/living/basic/chick/permanent{ + name = "Morgan" + }, +/turf/open/floor/grass, +/area/station/cargo/storage) "vGp" = ( /obj/structure/table/wood, /obj/machinery/light/small/red/dim/directional/south, @@ -65707,6 +65686,15 @@ /obj/effect/decal/cleanable/dirt/dust, /turf/open/floor/iron, /area/station/engineering/gravity_generator) +"wLm" = ( +/obj/machinery/door/firedoor, +/obj/effect/mapping_helpers/airlock/access/any/security/general, +/obj/machinery/door/airlock/security{ + name = "Courtroom" + }, +/obj/effect/mapping_helpers/airlock/access/any/security/court, +/turf/open/floor/plating, +/area/station/security/courtroom) "wLA" = ( /obj/machinery/holopad, /turf/open/floor/wood, @@ -70874,6 +70862,18 @@ dir = 8 }, /area/station/hallway/secondary/entry) +"ybJ" = ( +/obj/structure/cable, +/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, +/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, +/obj/machinery/door/airlock/security/glass{ + id_tag = "outerbrig"; + name = "Brig Cells" + }, +/obj/machinery/door/firedoor, +/obj/effect/mapping_helpers/airlock/access/all/security/entrance, +/turf/open/floor/iron/textured_half, +/area/station/security/brig) "ybL" = ( /obj/structure/disposalpipe/segment{ dir = 4 @@ -86183,7 +86183,7 @@ slY slY rST sgL -swO +vGk kYZ msy vLP @@ -90296,7 +90296,7 @@ iqq xPX wnd wnd -dmS +jKu jWZ xRV kuq @@ -90592,7 +90592,7 @@ gvn toY eAX lbO -myK +ybJ fbe wTX wTX @@ -90849,7 +90849,7 @@ eUg fBT nGe naG -dcO +oAY ykZ onX xDa @@ -95972,9 +95972,9 @@ cNF jVM qpX qHm -gqo +quI rJl -cWn +ofv vUG xmt ffX @@ -102655,7 +102655,7 @@ oeH wua jWy jWy -nAX +rRf jWy jWy jWy @@ -103430,7 +103430,7 @@ rRW snK wat tae -isR +wLm xvh xsb xPN @@ -104198,7 +104198,7 @@ wua wua wua qUt -lcc +spg wua wua wua @@ -106031,14 +106031,14 @@ kHo ldq rkI qoj -rSt +hsA wRU kFY kFY uNe fVG eJe -ngx +cwt nwN ufn dMM @@ -106295,7 +106295,7 @@ kFY hrC gHl elT -jrO +frP wEf uub uub @@ -107317,7 +107317,7 @@ kdn lxa ldq ldq -lCS +pyI ldq ldq wDG diff --git a/_maps/map_files/generic/CentCom_skyrat_z2.dmm b/_maps/map_files/generic/CentCom_skyrat_z2.dmm index 1410254771d..06a9468935b 100644 --- a/_maps/map_files/generic/CentCom_skyrat_z2.dmm +++ b/_maps/map_files/generic/CentCom_skyrat_z2.dmm @@ -1504,7 +1504,7 @@ }, /area/centcom/holding/cafe) "awN" = ( -/mob/living/simple_animal/chick, +/mob/living/basic/chick, /turf/open/misc/grass/planet, /area/centcom/holding/cafepark) "awQ" = ( diff --git a/code/__DEFINES/dcs/signals/signals_datum.dm b/code/__DEFINES/dcs/signals/signals_datum.dm index 98750ef5e7b..9e625a5f3b7 100644 --- a/code/__DEFINES/dcs/signals/signals_datum.dm +++ b/code/__DEFINES/dcs/signals/signals_datum.dm @@ -7,6 +7,7 @@ #define COMSIG_COMPONENT_ADDED "component_added" /// before a component is removed from a datum because of ClearFromParent: (/datum/component) #define COMSIG_COMPONENT_REMOVING "component_removing" + /// before a datum's Destroy() is called: (force), returning a nonzero value will cancel the qdel operation /// you should only be using this if you want to block deletion /// that's the only functional difference between it and COMSIG_PARENT_QDELETING, outside setting QDELETING to detect diff --git a/code/_globalvars/phobias.dm b/code/_globalvars/phobias.dm index 618caf1ccf2..d9adb3c8bff 100644 --- a/code/_globalvars/phobias.dm +++ b/code/_globalvars/phobias.dm @@ -57,8 +57,8 @@ GLOBAL_LIST_INIT(phobia_mobs, list( )), "anime" = typecacheof(list(/mob/living/simple_animal/hostile/guardian)), "birds" = typecacheof(list( + /mob/living/basic/chick, /mob/living/basic/chicken, - /mob/living/simple_animal/chick, /mob/living/simple_animal/parrot, /mob/living/simple_animal/pet/penguin, )), diff --git a/code/datums/ai/basic_mobs/basic_subtrees/speech_subtree.dm b/code/datums/ai/basic_mobs/basic_subtrees/speech_subtree.dm index e4690b8f550..03d4cae546b 100644 --- a/code/datums/ai/basic_mobs/basic_subtrees/speech_subtree.dm +++ b/code/datums/ai/basic_mobs/basic_subtrees/speech_subtree.dm @@ -96,6 +96,12 @@ emote_hear = list("clucks.", "croons.") emote_see = list("pecks at the ground.","flaps her wings viciously.") +/datum/ai_planning_subtree/random_speech/chick + speech_chance = 4 + speak = list("Cherp.", "Cherp?", "Chirrup.", "Cheep!") + emote_hear = list("cheeps.") + emote_see = list("pecks at the ground.","flaps her tiny wings.") + /datum/ai_planning_subtree/random_speech/cow speech_chance = 1 speak = list("moo?","moo","MOOOOOO") diff --git a/code/datums/components/growth_and_differentiation.dm b/code/datums/components/growth_and_differentiation.dm index 8dd659bad81..e326c4f4a77 100644 --- a/code/datums/components/growth_and_differentiation.dm +++ b/code/datums/components/growth_and_differentiation.dm @@ -2,10 +2,7 @@ * ### Growth and Differentiation Component: Used to randomly "grow" a creature into a new entity over its lifespan. * * If we are passed a typepath, we will 100% grow into that type. However, if we are not passed a typepath, we will pick one from a subtype of the parent we were applied to! - * - * Used for spiderlings to turn them into giant spiders. */ - /datum/component/growth_and_differentiation /// What this mob turns into when fully grown. var/growth_path @@ -18,6 +15,8 @@ var/lower_growth_value /// Integer - The upper bound for the percentage we have to grow before we can differentiate. var/upper_growth_value + /// List of signals we kill on ourselves when we grow. + var/list/signals_to_kill_on /// Optional callback for checks to see if we're okay to grow. var/datum/callback/optional_checks /// Optional callback in case we wish to override the default grow() behavior. Assume we supersede the change_mob_type() call if we have this set. @@ -32,7 +31,16 @@ /// and will actively try to grow the mob (only barred by optional checks). var/ready_to_grow = FALSE -/datum/component/growth_and_differentiation/Initialize(growth_time, growth_path, growth_probability, lower_growth_value, upper_growth_value, optional_checks, optional_grow_behavior) +/datum/component/growth_and_differentiation/Initialize( + growth_time, + growth_path, + growth_probability, + lower_growth_value, + upper_growth_value, + list/signals_to_kill_on, + datum/callback/optional_checks, + datum/callback/optional_grow_behavior, +) if(!isliving(parent)) return COMPONENT_INCOMPATIBLE @@ -44,6 +52,10 @@ src.optional_checks = optional_checks src.optional_grow_behavior = optional_grow_behavior + if(islist(signals_to_kill_on)) + src.signals_to_kill_on = signals_to_kill_on + RegisterSignals(parent, src.signals_to_kill_on, PROC_REF(stop_component_processing_entirely)) + // If we haven't started the round, we can't do timer stuff. Let's wait in case we're mapped in or something. if(!SSticker.HasRoundStarted() && !isnull(growth_time)) RegisterSignal(SSticker, COMSIG_TICKER_ROUND_STARTING, PROC_REF(comp_on_round_start)) @@ -52,11 +64,14 @@ return setup_growth_tracking() /datum/component/growth_and_differentiation/Destroy(force, silent) - . = ..() + STOP_PROCESSING(SSdcs, src) deltimer(timer_id) + return ..() -/datum/component/growth_and_differentiation/UnregisterFromParent() - UnregisterSignal(SSticker, COMSIG_TICKER_ROUND_STARTING) +/// Wrapper for qdel() so we can pass it in RegisterSignals(). I hate it here too. +/datum/component/growth_and_differentiation/proc/stop_component_processing_entirely() + SIGNAL_HANDLER + qdel(src) /// What we invoke when the round starts so we can set up our timer. /datum/component/growth_and_differentiation/proc/comp_on_round_start() @@ -64,7 +79,7 @@ setup_growth_tracking() UnregisterSignal(SSticker, COMSIG_TICKER_ROUND_STARTING) -/// Sets up the failover timer for certain growth. +/// Sets up the two different systems for growth: the timer and the probability based one. Both can coexist. Return COMPONENT_INCOMPATIBLE if we fail to set up either. /datum/component/growth_and_differentiation/proc/setup_growth_tracking() var/did_we_add_at_least_one_thing = FALSE @@ -113,10 +128,11 @@ optional_grow_behavior.Invoke() return - var/mob/living/new_mob = growth_path - if(!istype(new_mob)) + if(!ispath(growth_path, /mob/living)) CRASH("Growth and Differentiation Component: Growth path was not a mob type! If you wanted to do something special, please put it in the optional_grow_behavior callback instead!") + var/mob/living/new_mob = growth_path + var/new_mob_name = initial(new_mob.name) if(!silent) diff --git a/code/datums/memory/_memory.dm b/code/datums/memory/_memory.dm index 2bc4574f654..f8b4a705950 100644 --- a/code/datums/memory/_memory.dm +++ b/code/datums/memory/_memory.dm @@ -249,6 +249,7 @@ /mob/living/basic/carp, /mob/living/basic/carp/magic, /mob/living/basic/carp/magic/chaos, + /mob/living/basic/chick, /mob/living/basic/chicken, /mob/living/basic/cow, /mob/living/basic/cow/wisdom, @@ -262,7 +263,6 @@ /mob/living/basic/statue, /mob/living/basic/stickman, /mob/living/basic/stickman/dog, - /mob/living/simple_animal/chick, /mob/living/simple_animal/crab, /mob/living/simple_animal/hostile/asteroid/basilisk/watcher, /mob/living/simple_animal/hostile/asteroid/goliath/beast, diff --git a/code/game/objects/items/food/egg.dm b/code/game/objects/items/food/egg.dm index 174f893a9f7..a93ba6e3cd1 100644 --- a/code/game/objects/items/food/egg.dm +++ b/code/game/objects/items/food/egg.dm @@ -67,14 +67,14 @@ GLOBAL_VAR_INIT(chicks_from_eggs, 0) var/chance = rand(0, 255) switch(chance) if(0 to 30) - new /mob/living/simple_animal/chick(hit_turf) + new /mob/living/basic/chick(hit_turf) GLOB.chicks_from_eggs++ visible_message(span_notice("A chick comes out of the cracked egg!")) if(31) var/spawned_chickens = min(4, MAX_CHICKENS - GLOB.chicks_from_eggs) // We don't want to go over the limit visible_message(span_notice("[spawned_chickens] chicks come out of the egg! Jackpot!")) for(var/i in 1 to spawned_chickens) - new /mob/living/simple_animal/chick(hit_turf) + new /mob/living/basic/chick(hit_turf) GLOB.chicks_from_eggs++ reagents.expose(hit_atom, TOUCH) @@ -171,7 +171,7 @@ GLOBAL_VAR_INIT(chicks_from_eggs, 0) . = ..() AddComponent(/datum/component/fertile_egg,\ - embryo_type = /mob/living/simple_animal/chick,\ + embryo_type = /mob/living/basic/chick,\ minimum_growth_rate = 1,\ maximum_growth_rate = 2,\ total_growth_required = 200,\ diff --git a/code/modules/cargo/packs/livestock.dm b/code/modules/cargo/packs/livestock.dm index 333ead4bc1a..bd58abd984f 100644 --- a/code/modules/cargo/packs/livestock.dm +++ b/code/modules/cargo/packs/livestock.dm @@ -52,7 +52,7 @@ desc = "The chicken goes bwaak!" cost = CARGO_CRATE_VALUE * 4 access_view = ACCESS_KITCHEN - contains = list( /mob/living/simple_animal/chick) + contains = list(/mob/living/basic/chick) crate_name = "chicken crate" /datum/supply_pack/critter/corgi diff --git a/code/modules/holodeck/holo_effect.dm b/code/modules/holodeck/holo_effect.dm index 5b2de971ce1..f97a7f2a139 100644 --- a/code/modules/holodeck/holo_effect.dm +++ b/code/modules/holodeck/holo_effect.dm @@ -83,8 +83,8 @@ . = ..() mobtype = list( /mob/living/basic/butterfly, + /mob/living/basic/chick/permanent, /mob/living/basic/rabbit, - /mob/living/simple_animal/chick/holo, /mob/living/simple_animal/pet/fox, ) mobtype += pick( diff --git a/code/modules/mob/living/basic/farm_animals/chicken/chick.dm b/code/modules/mob/living/basic/farm_animals/chicken/chick.dm new file mode 100644 index 00000000000..339b2c5e7f5 --- /dev/null +++ b/code/modules/mob/living/basic/farm_animals/chicken/chick.dm @@ -0,0 +1,64 @@ +/** + * ## Chicks + * + * Baby birds that grow into big chickens. + */ +/mob/living/basic/chick + name = "\improper chick" + desc = "Adorable! They make such a racket though." + icon_state = "chick" + icon_living = "chick" + icon_dead = "chick_dead" + icon_gib = "chick_gib" + gender = FEMALE + mob_biotypes = MOB_ORGANIC|MOB_BEAST + speak_emote = list("cheeps") + density = FALSE + butcher_results = list(/obj/item/food/meat/slab/chicken = 1) + response_help_continuous = "pets" + response_help_simple = "pet" + response_disarm_continuous = "gently pushes aside" + response_disarm_simple = "gently push aside" + response_harm_continuous = "kicks" + response_harm_simple = "kick" + attack_verb_continuous = "kicks" + attack_verb_simple = "kick" + health = 3 + maxHealth = 3 + pass_flags = PASSTABLE | PASSGRILLE | PASSMOB + mob_size = MOB_SIZE_TINY + gold_core_spawnable = FRIENDLY_SPAWN + + /// What we grow into. + var/grow_as = /mob/living/basic/chicken + +/mob/living/basic/chick/Initialize(mapload) + . = ..() + pixel_x = base_pixel_x + rand(-6, 6) + pixel_y = base_pixel_y + rand(0, 10) + + ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT) + + AddElement(/datum/element/pet_bonus, "chirps!") + AddElement(/datum/element/swabable, CELL_LINE_TABLE_CHICKEN, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 5) + AddElement(/datum/element/footstep, FOOTSTEP_MOB_CLAW) + + if(!isnull(grow_as)) // we don't have a set time to grow up beyond whatever RNG dictates, and if we somehow get a client, all growth halts. + AddComponent(\ + /datum/component/growth_and_differentiation,\ + growth_time = null,\ + growth_path = grow_as,\ + growth_probability = 100,\ + lower_growth_value = 0.5,\ + upper_growth_value = 1,\ + signals_to_kill_on = list(COMSIG_MOB_CLIENT_LOGIN),\ + optional_checks = CALLBACK(src, PROC_REF(ready_to_grow)),\ + ) + +/// We don't grow into a chicken if we're not conscious. +/mob/living/basic/chick/proc/ready_to_grow() + return (stat == CONSCIOUS) + +/// Variant of chick that just spawns in the holodeck so you can pet it. Doesn't grow up. +/mob/living/basic/chick/permanent + grow_as = null diff --git a/code/modules/mob/living/basic/farm_animals/chicken.dm b/code/modules/mob/living/basic/farm_animals/chicken/chicken.dm similarity index 98% rename from code/modules/mob/living/basic/farm_animals/chicken.dm rename to code/modules/mob/living/basic/farm_animals/chicken/chicken.dm index f102ee43da1..9c8cec97884 100644 --- a/code/modules/mob/living/basic/farm_animals/chicken.dm +++ b/code/modules/mob/living/basic/farm_animals/chicken/chicken.dm @@ -6,8 +6,6 @@ GLOBAL_VAR_INIT(chicken_count, 0) * * Not-entirely-flightless domesticated birds that lay eggs, which are then consumed by humans and other animals. */ - - /mob/living/basic/chicken name = "\improper chicken" desc = "Hopefully the eggs are good this season." @@ -68,7 +66,7 @@ GLOBAL_VAR_INIT(chicken_count, 0) if(GLOB.chicken_count <= MAX_CHICKENS && fertile && prob(25)) egg.AddComponent(\ /datum/component/fertile_egg,\ - embryo_type = /mob/living/simple_animal/chick,\ + embryo_type = /mob/living/basic/chick,\ minimum_growth_rate = 1,\ maximum_growth_rate = 2,\ total_growth_required = 200,\ @@ -93,3 +91,4 @@ GLOBAL_VAR_INIT(chicken_count, 0) /datum/ai_planning_subtree/basic_melee_attack_subtree, /datum/ai_planning_subtree/random_speech/chicken, ) + diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index e10637818a7..57a04a3aff5 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1440,6 +1440,7 @@ /mob/living/basic/carp, /mob/living/basic/carp/magic, /mob/living/basic/carp/magic/chaos, + /mob/living/basic/chick, /mob/living/basic/chicken, /mob/living/basic/cow, /mob/living/basic/giant_spider, @@ -1453,7 +1454,6 @@ /mob/living/basic/statue, /mob/living/basic/stickman, /mob/living/basic/stickman/dog, - /mob/living/simple_animal/chick, /mob/living/simple_animal/crab, /mob/living/simple_animal/hostile/asteroid/basilisk/watcher, /mob/living/simple_animal/hostile/asteroid/goliath/beast, diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm index a1556d2f684..04d7ac56023 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -118,63 +118,3 @@ plant_target.visible_message(span_warning("[src] takes a big chomp out of [plant_target]!"), \ span_userdanger("[src] takes a big chomp out of your [edible_bodypart || "body"]!")) - - -/mob/living/simple_animal/chick - name = "\improper chick" - desc = "Adorable! They make such a racket though." - icon_state = "chick" - icon_living = "chick" - icon_dead = "chick_dead" - icon_gib = "chick_gib" - gender = FEMALE - mob_biotypes = MOB_ORGANIC|MOB_BEAST - speak = list("Cherp.","Cherp?","Chirrup.","Cheep!") - speak_emote = list("cheeps") - emote_hear = list("cheeps.") - emote_see = list("pecks at the ground.","flaps her tiny wings.") - density = FALSE - speak_chance = 2 - turns_per_move = 2 - butcher_results = list(/obj/item/food/meat/slab/chicken = 1) - response_help_continuous = "pets" - response_help_simple = "pet" - response_disarm_continuous = "gently pushes aside" - response_disarm_simple = "gently push aside" - response_harm_continuous = "kicks" - response_harm_simple = "kick" - attack_verb_continuous = "kicks" - attack_verb_simple = "kick" - health = 3 - maxHealth = 3 - var/amount_grown = 0 - pass_flags = PASSTABLE | PASSGRILLE | PASSMOB - mob_size = MOB_SIZE_TINY - gold_core_spawnable = FRIENDLY_SPAWN - - footstep_type = FOOTSTEP_MOB_CLAW - -/mob/living/simple_animal/chick/Initialize(mapload) - . = ..() - AddElement(/datum/element/pet_bonus, "chirps!") - pixel_x = base_pixel_x + rand(-6, 6) - pixel_y = base_pixel_y + rand(0, 10) - add_cell_sample() - ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT) - -/mob/living/simple_animal/chick/add_cell_sample() - AddElement(/datum/element/swabable, CELL_LINE_TABLE_CHICKEN, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 5) - -/mob/living/simple_animal/chick/Life(seconds_per_tick = SSMOBS_DT, times_fired) - . =..() - if(!.) - return - if(!stat && !ckey) - amount_grown += rand(0.5 * seconds_per_tick, 1 * seconds_per_tick) - if(amount_grown >= 100) - new /mob/living/basic/chicken(src.loc) - qdel(src) - -/mob/living/simple_animal/chick/holo/Life(seconds_per_tick = SSMOBS_DT, times_fired) - ..() - amount_grown = 0 diff --git a/code/modules/unit_tests/simple_animal_freeze.dm b/code/modules/unit_tests/simple_animal_freeze.dm index 1057d035bc5..042057ff1b4 100644 --- a/code/modules/unit_tests/simple_animal_freeze.dm +++ b/code/modules/unit_tests/simple_animal_freeze.dm @@ -32,8 +32,6 @@ /mob/living/simple_animal/bot/secbot/honkbot, /mob/living/simple_animal/bot/secbot/pingsky, /mob/living/simple_animal/bot/vibebot, - /mob/living/simple_animal/chick, - /mob/living/simple_animal/chick/holo, /mob/living/simple_animal/crab, /mob/living/simple_animal/crab/coffee, /mob/living/simple_animal/crab/evil, diff --git a/tgstation.dme b/tgstation.dme index de819a62c20..3ff866f1483 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -4024,11 +4024,12 @@ #include "code\modules\mob\living\basic\festivus_pole.dm" #include "code\modules\mob\living\basic\health_adjustment.dm" #include "code\modules\mob\living\basic\tree.dm" -#include "code\modules\mob\living\basic\farm_animals\chicken.dm" #include "code\modules\mob\living\basic\farm_animals\deer.dm" #include "code\modules\mob\living\basic\farm_animals\pig.dm" #include "code\modules\mob\living\basic\farm_animals\rabbit.dm" #include "code\modules\mob\living\basic\farm_animals\sheep.dm" +#include "code\modules\mob\living\basic\farm_animals\chicken\chick.dm" +#include "code\modules\mob\living\basic\farm_animals\chicken\chicken.dm" #include "code\modules\mob\living\basic\farm_animals\cow\_cow.dm" #include "code\modules\mob\living\basic\farm_animals\cow\cow_ai.dm" #include "code\modules\mob\living\basic\farm_animals\cow\cow_moonicorn.dm" diff --git a/tools/UpdatePaths/Scripts/75592_simple_to_basic_chickens.txt b/tools/UpdatePaths/Scripts/75592_simple_to_basic_chickens.txt index 1b2f6ee1d19..c2eaf98dc58 100644 --- a/tools/UpdatePaths/Scripts/75592_simple_to_basic_chickens.txt +++ b/tools/UpdatePaths/Scripts/75592_simple_to_basic_chickens.txt @@ -1 +1,5 @@ /mob/living/simple_animal/chicken : /mob/living/basic/chicken{@OLD} + +## Updated in #75663 +/mob/living/simple_animal/chick : /mob/living/basic/chick{@OLD} +/mob/living/simple_animal/chick/holo : /mob/living/basic/chick/permanent{@OLD}