From 8442124bcd5d6191fcf60b60c6d158f13c5dd3ca Mon Sep 17 00:00:00 2001 From: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Fri, 31 May 2024 18:48:31 -0400 Subject: [PATCH] Gondolas are now basic mobs (#83451) ## About The Pull Request This PR turns gondolas into basic mobs and does some fiddling with gondola pods Their verbs are now action buttons which they lose upon delivering. If set to stay, they won't have their abilities afterwards (or wont get them in the first place if the delivery is already done). Lets them survive without a pod requirement in case admins want to spawn one for their own stuff, so I also removed it from the snowflake checks to exclude them from stuff. Also replaced the hardcoded "cant speak" with simply giving the mute trait, so admins can make gondolas speak if they want to for any reason. ## Why It's Good For The Game The pet level of simple animals can finally be killed off, also gives admins more control over gondola-related stuff if they so wish. ## Changelog :cl: refactor: Gondolas (including gondola pods) are now basic mobs. /:cl: --------- Co-authored-by: san7890 --- .../SpaceRuins/gondolaasteroid.dmm | 2 +- _maps/deathmatch/ragin_mages.dmm | 2 +- _maps/templates/lazy_templates/wizard_den.dmm | 2 +- _maps/virtual_domains/gondola_asteroid.dmm | 2 +- code/_globalvars/lists/mobs.dm | 1 - code/datums/brain_damage/severe.dm | 2 +- code/datums/diseases/transformation.dm | 2 +- code/game/machinery/washing_machine.dm | 8 +- .../domains/gondola_asteroid.dm | 10 +- .../virtual_domain/modular_mob_segment.dm | 2 +- code/modules/cargo/gondolapod.dm | 80 ---------- code/modules/cargo/supplypod.dm | 2 +- code/modules/events/ghost_role/sentience.dm | 1 - code/modules/events/vent_clog.dm | 2 +- code/modules/events/wizard/petsplosion.dm | 1 - code/modules/explorer_drone/loot.dm | 2 +- code/modules/mining/abandoned_crates.dm | 2 +- .../mob/living/basic/pets/dog/corgi.dm | 2 +- .../mob/living/basic/pets/gondolas/gondola.dm | 83 +++++++++++ .../living/basic/pets/gondolas/gondolapod.dm | 104 +++++++++++++ .../living/simple_animal/friendly/gondola.dm | 69 --------- .../mob/living/simple_animal/friendly/pet.dm | 140 ------------------ code/modules/unit_tests/mob_faction.dm | 1 - .../unit_tests/simple_animal_freeze.dm | 4 - code/modules/unit_tests/strange_reagent.dm | 1 - code/modules/unit_tests/unit_test.dm | 2 - tgstation.dme | 5 +- .../Scripts/83451_basic_gondola.txt | 2 + 28 files changed, 212 insertions(+), 324 deletions(-) delete mode 100644 code/modules/cargo/gondolapod.dm create mode 100644 code/modules/mob/living/basic/pets/gondolas/gondola.dm create mode 100644 code/modules/mob/living/basic/pets/gondolas/gondolapod.dm delete mode 100644 code/modules/mob/living/simple_animal/friendly/gondola.dm delete mode 100644 code/modules/mob/living/simple_animal/friendly/pet.dm create mode 100644 tools/UpdatePaths/Scripts/83451_basic_gondola.txt diff --git a/_maps/RandomRuins/SpaceRuins/gondolaasteroid.dmm b/_maps/RandomRuins/SpaceRuins/gondolaasteroid.dmm index 70dfed5d5d6..981b2c1e2b3 100644 --- a/_maps/RandomRuins/SpaceRuins/gondolaasteroid.dmm +++ b/_maps/RandomRuins/SpaceRuins/gondolaasteroid.dmm @@ -27,7 +27,7 @@ /turf/open/floor/grass, /area/ruin/space/has_grav) "h" = ( -/mob/living/simple_animal/pet/gondola, +/mob/living/basic/pet/gondola, /turf/open/floor/grass, /area/ruin/space/has_grav) "i" = ( diff --git a/_maps/deathmatch/ragin_mages.dmm b/_maps/deathmatch/ragin_mages.dmm index 37939643b72..8c42ef8665a 100644 --- a/_maps/deathmatch/ragin_mages.dmm +++ b/_maps/deathmatch/ragin_mages.dmm @@ -47,7 +47,7 @@ /area/deathmatch/teleport) "ct" = ( /obj/structure/flora/bush/grassy/style_random, -/mob/living/simple_animal/pet/gondola{ +/mob/living/basic/pet/gondola{ name = "Jommy"; faction = list("gondola", "Wizard") }, diff --git a/_maps/templates/lazy_templates/wizard_den.dmm b/_maps/templates/lazy_templates/wizard_den.dmm index 58e09b40a0a..472dde511c4 100644 --- a/_maps/templates/lazy_templates/wizard_den.dmm +++ b/_maps/templates/lazy_templates/wizard_den.dmm @@ -536,7 +536,7 @@ /turf/open/floor/iron, /area/centcom/wizard_station) "AW" = ( -/mob/living/simple_animal/pet/gondola{ +/mob/living/basic/pet/gondola{ name = "Jommy"; faction = list("gondola", "Wizard") }, diff --git a/_maps/virtual_domains/gondola_asteroid.dmm b/_maps/virtual_domains/gondola_asteroid.dmm index cb8f2625f0d..6ed8763f9a6 100644 --- a/_maps/virtual_domains/gondola_asteroid.dmm +++ b/_maps/virtual_domains/gondola_asteroid.dmm @@ -53,7 +53,7 @@ /turf/open/floor/grass, /area/ruin/space/has_grav/powered/virtual_domain) "z" = ( -/mob/living/simple_animal/pet/gondola/virtual_domain, +/mob/living/basic/pet/gondola/virtual_domain, /turf/open/floor/grass, /area/ruin/space/has_grav/powered/virtual_domain) "A" = ( diff --git a/code/_globalvars/lists/mobs.dm b/code/_globalvars/lists/mobs.dm index 692704be0ff..942c8cbf6b1 100644 --- a/code/_globalvars/lists/mobs.dm +++ b/code/_globalvars/lists/mobs.dm @@ -32,7 +32,6 @@ GLOBAL_LIST_INIT(abstract_mob_types, list( /mob/living/simple_animal/hostile/mimic, // Cannot exist if spawned without being passed an item reference /mob/living/simple_animal/hostile/retaliate, /mob/living/simple_animal/hostile, - /mob/living/simple_animal/pet, /mob/living/simple_animal/soulscythe, // As mimic, can't exist if spawned outside an item /mob/living/simple_animal, )) diff --git a/code/datums/brain_damage/severe.dm b/code/datums/brain_damage/severe.dm index f22b0ab44b3..a639a0f5714 100644 --- a/code/datums/brain_damage/severe.dm +++ b/code/datums/brain_damage/severe.dm @@ -187,7 +187,7 @@ for(var/mob/M in oview(owner, check_radius)) if(!isliving(M)) //ghosts ain't people continue - if(istype(M, /mob/living/simple_animal/pet) || istype(M, /mob/living/basic/pet) || M.ckey) + if(istype(M, /mob/living/basic/pet) || M.ckey) return FALSE return TRUE diff --git a/code/datums/diseases/transformation.dm b/code/datums/diseases/transformation.dm index 83e7ac02534..e672a86d720 100644 --- a/code/datums/diseases/transformation.dm +++ b/code/datums/diseases/transformation.dm @@ -335,7 +335,7 @@ ) stage4 = list(span_danger("You can't feel your arms. It does not bother you anymore."), span_danger("You forgive the clown for hurting you.")) stage5 = list(span_danger("You have become a Gondola.")) - new_form = /mob/living/simple_animal/pet/gondola + new_form = /mob/living/basic/pet/gondola /datum/disease/transformation/gondola/stage_act(seconds_per_tick, times_fired) diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index 6ae82fd2654..7b6632e3cab 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -276,13 +276,9 @@ GLOBAL_LIST_INIT(dye_registry, list( new /obj/item/food/meat/slab/corgi(loc) qdel(src) -/mob/living/simple_animal/pet/machine_wash(obj/machinery/washing_machine/washer) - washer.bloody_mess = TRUE - investigate_log("has been gibbed by a washing machine.", INVESTIGATE_DEATHS) - gib() - /mob/living/basic/pet/machine_wash(obj/machinery/washing_machine/washer) washer.bloody_mess = TRUE + investigate_log("has been gibbed by a washing machine.", INVESTIGATE_DEATHS) gib() /obj/item/machine_wash(obj/machinery/washing_machine/washer) @@ -378,7 +374,7 @@ GLOBAL_LIST_INIT(dye_registry, list( if(L.buckled || L.has_buckled_mobs()) return if(state_open) - if(istype(L, /mob/living/simple_animal/pet) || istype(L, /mob/living/basic/pet)) + if(istype(L, /mob/living/basic/pet)) L.forceMove(src) update_appearance() return diff --git a/code/modules/bitrunning/virtual_domain/domains/gondola_asteroid.dm b/code/modules/bitrunning/virtual_domain/domains/gondola_asteroid.dm index 42fbb0c1427..42070239144 100644 --- a/code/modules/bitrunning/virtual_domain/domains/gondola_asteroid.dm +++ b/code/modules/bitrunning/virtual_domain/domains/gondola_asteroid.dm @@ -11,9 +11,13 @@ /obj/structure/closet/crate/secure/bitrunning/encrypted/gondola move_resist = MOVE_FORCE_STRONG -/mob/living/simple_animal/pet/gondola/virtual_domain +/mob/living/basic/pet/gondola/virtual_domain health = 50 - loot = list(/obj/effect/decal/cleanable/blood/gibs, /obj/item/stack/sheet/animalhide/gondola = 1, /obj/item/food/meat/slab/gondola/virtual_domain = 1) + loot = list( + /obj/effect/decal/cleanable/blood/gibs = 1, + /obj/item/stack/sheet/animalhide/gondola = 1, + /obj/item/food/meat/slab/gondola/virtual_domain = 1, + ) maxHealth = 50 move_force = MOVE_FORCE_VERY_STRONG move_resist = MOVE_FORCE_STRONG @@ -30,4 +34,4 @@ /datum/disease/transformation/gondola/virtual_domain stage_prob = 9 - new_form = /mob/living/simple_animal/pet/gondola/virtual_domain + new_form = /mob/living/basic/pet/gondola/virtual_domain diff --git a/code/modules/bitrunning/virtual_domain/modular_mob_segment.dm b/code/modules/bitrunning/virtual_domain/modular_mob_segment.dm index c0e017a0b9f..b8c5880a69c 100644 --- a/code/modules/bitrunning/virtual_domain/modular_mob_segment.dm +++ b/code/modules/bitrunning/virtual_domain/modular_mob_segment.dm @@ -52,7 +52,7 @@ /datum/modular_mob_segment/gondolas mobs = list( - /mob/living/simple_animal/pet/gondola, + /mob/living/basic/pet/gondola, ) /datum/modular_mob_segment/corgis diff --git a/code/modules/cargo/gondolapod.dm b/code/modules/cargo/gondolapod.dm deleted file mode 100644 index 2491084ab70..00000000000 --- a/code/modules/cargo/gondolapod.dm +++ /dev/null @@ -1,80 +0,0 @@ -/mob/living/simple_animal/pet/gondola/gondolapod - name = "gondola" - real_name = "gondola" - desc = "The silent walker. This one seems to be part of a delivery agency." - response_help_continuous = "pets" - response_help_simple = "pet" - response_disarm_continuous = "bops" - response_disarm_simple = "bop" - response_harm_continuous = "kicks" - response_harm_simple = "kick" - faction = list(FACTION_GONDOLA) - turns_per_move = 10 - icon = 'icons/obj/supplypods.dmi' - icon_state = "gondola" - icon_living = "gondola" - SET_BASE_PIXEL(-16, -5) //2x2 sprite - layer = TABLE_LAYER//so that deliveries dont appear underneath it - loot = list(/obj/effect/decal/cleanable/blood/gibs, /obj/item/stack/sheet/animalhide/gondola = 2, /obj/item/food/meat/slab/gondola = 2) - //Gondolas aren't affected by cold. - atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_plas" = 0, "max_plas" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) - minbodytemp = 0 - maxbodytemp = 1500 - maxHealth = 200 - health = 200 - del_on_death = TRUE - var/opened = FALSE - var/obj/structure/closet/supplypod/centcompod/linked_pod - -/mob/living/simple_animal/pet/gondola/gondolapod/Initialize(mapload, pod) - if(!pod) - stack_trace("Gondola pod created with no pod") - return INITIALIZE_HINT_QDEL - linked_pod = pod - name = linked_pod.name - desc = linked_pod.desc - . = ..() - -/mob/living/simple_animal/pet/gondola/gondolapod/update_overlays() - . = ..() - if(opened) - . += "[icon_state]_open" - -/mob/living/simple_animal/pet/gondola/gondolapod/verb/deliver() - set name = "Release Contents" - set category = "Gondola" - set desc = "Release any contents stored within your vast belly." - linked_pod.open_pod(src, forced = TRUE) - -/mob/living/simple_animal/pet/gondola/gondolapod/examine(mob/user) - . = ..() - if (contents.len) - . += span_notice("It looks like it hasn't made its delivery yet.") - else - . += span_notice("It looks like it has already made its delivery.") - -/mob/living/simple_animal/pet/gondola/gondolapod/verb/check() - set name = "Count Contents" - set category = "Gondola" - set desc = "Take a deep look inside youself, and count up what's inside" - var/total = contents.len - if (total) - to_chat(src, span_notice("You detect [total] object\s within your incredibly vast belly.")) - else - to_chat(src, span_notice("A closer look inside yourself reveals... nothing.")) - -/mob/living/simple_animal/pet/gondola/gondolapod/setOpened() - opened = TRUE - layer = initial(layer) - update_appearance() - addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, setClosed)), 5 SECONDS) - -/mob/living/simple_animal/pet/gondola/gondolapod/setClosed() - opened = FALSE - layer = LOW_MOB_LAYER - update_appearance() - -/mob/living/simple_animal/pet/gondola/gondolapod/death() - QDEL_NULL(linked_pod) //Will cause the open() proc for the linked supplypod to be called with the "broken" parameter set to true, meaning that it will dump its contents on death - qdel(src) - ..() diff --git a/code/modules/cargo/supplypod.dm b/code/modules/cargo/supplypod.dm index 82b8d5b63a2..417e5519ba0 100644 --- a/code/modules/cargo/supplypod.dm +++ b/code/modules/cargo/supplypod.dm @@ -352,7 +352,7 @@ qdel(src) return if (style == STYLE_GONDOLA) //Checks if we are supposed to be a gondola pod. If so, create a gondolapod mob, and move this pod to nullspace. I'd like to give a shout out, to my man oranges - var/mob/living/simple_animal/pet/gondola/gondolapod/benis = new(turf_underneath, src) + var/mob/living/basic/pet/gondola/gondolapod/benis = new(turf_underneath, src) benis.contents |= contents //Move the contents of this supplypod into the gondolapod mob. for (var/mob/living/mob_in_pod in benis.contents) mob_in_pod.reset_perspective(null) diff --git a/code/modules/events/ghost_role/sentience.dm b/code/modules/events/ghost_role/sentience.dm index e60498a90d0..002c161f66c 100644 --- a/code/modules/events/ghost_role/sentience.dm +++ b/code/modules/events/ghost_role/sentience.dm @@ -17,7 +17,6 @@ GLOBAL_LIST_INIT(high_priority_sentience, typecacheof(list( /mob/living/basic/spider/giant/sgt_araneus, /mob/living/simple_animal/bot/secbot/beepsky, /mob/living/simple_animal/hostile/retaliate/goose/vomit, - /mob/living/simple_animal/pet, ))) /datum/round_event_control/sentience diff --git a/code/modules/events/vent_clog.dm b/code/modules/events/vent_clog.dm index fbd9b746d03..a263059fa72 100644 --- a/code/modules/events/vent_clog.dm +++ b/code/modules/events/vent_clog.dm @@ -298,7 +298,7 @@ /mob/living/basic/mushroom, /mob/living/basic/viscerator, /mob/living/simple_animal/hostile/retaliate/goose, //Janitors HATE geese. - /mob/living/simple_animal/pet/gondola, + /mob/living/basic/pet/gondola, ) return pick(mob_list) diff --git a/code/modules/events/wizard/petsplosion.dm b/code/modules/events/wizard/petsplosion.dm index 9de7fffcc3a..58d463ab9df 100644 --- a/code/modules/events/wizard/petsplosion.dm +++ b/code/modules/events/wizard/petsplosion.dm @@ -18,7 +18,6 @@ GLOBAL_LIST_INIT(petsplosion_candidates, typecacheof(list( /mob/living/basic/snake, /mob/living/basic/spider/giant/sgt_araneus, /mob/living/simple_animal/hostile/retaliate/goose/vomit, - /mob/living/simple_animal/pet, ))) /datum/round_event_control/wizard/petsplosion //the horror diff --git a/code/modules/explorer_drone/loot.dm b/code/modules/explorer_drone/loot.dm index 72773123968..901b87e1018 100644 --- a/code/modules/explorer_drone/loot.dm +++ b/code/modules/explorer_drone/loot.dm @@ -105,7 +105,7 @@ GLOBAL_LIST_INIT(adventure_loot_generator_index,generate_generator_index()) /datum/adventure_loot_generator/pet/generate() var/obj/item/pet_carrier/carrier = new carrier_type() var/chosen_pet_type = pick(possible_pets) - var/mob/living/simple_animal/pet/pet = new chosen_pet_type() + var/mob/living/basic/pet/pet = new chosen_pet_type() carrier.add_occupant(pet) return carrier diff --git a/code/modules/mining/abandoned_crates.dm b/code/modules/mining/abandoned_crates.dm index 0b029bc3b63..9a0d5b01de0 100644 --- a/code/modules/mining/abandoned_crates.dm +++ b/code/modules/mining/abandoned_crates.dm @@ -195,7 +195,7 @@ if(71 to 72) new /obj/item/toy/plush/snakeplushie(src) if(73 to 74) - new /mob/living/simple_animal/pet/gondola(src) + new /mob/living/basic/pet/gondola(src) if(75 to 76) new /obj/item/bikehorn/airhorn(src) if(77 to 78) diff --git a/code/modules/mob/living/basic/pets/dog/corgi.dm b/code/modules/mob/living/basic/pets/dog/corgi.dm index 2011992da56..7e13c792d28 100644 --- a/code/modules/mob/living/basic/pets/dog/corgi.dm +++ b/code/modules/mob/living/basic/pets/dog/corgi.dm @@ -472,7 +472,7 @@ unique_pet = TRUE held_state = "narsian" /// Mobs we will consume in the name of Nar'Sie - var/static/list/edible_types = list(/mob/living/simple_animal/pet, /mob/living/basic/pet) + var/static/list/edible_types = list(/mob/living/basic/pet) /mob/living/basic/pet/dog/corgi/narsie/Initialize(mapload) . = ..() diff --git a/code/modules/mob/living/basic/pets/gondolas/gondola.dm b/code/modules/mob/living/basic/pets/gondolas/gondola.dm new file mode 100644 index 00000000000..9e17d1e08a5 --- /dev/null +++ b/code/modules/mob/living/basic/pets/gondolas/gondola.dm @@ -0,0 +1,83 @@ +#define GONDOLA_HEIGHT pick(list("gondola_body_long", "gondola_body_medium", "gondola_body_short")) +#define GONDOLA_COLOR pick(list("A87855", "915E48", "683E2C")) +#define GONDOLA_MOUSTACHE pick(list("gondola_moustache_large", "gondola_moustache_small")) +#define GONDOLA_EYES pick(list("gondola_eyes_close", "gondola_eyes_far")) + +/mob/living/basic/pet/gondola + name = "gondola" + real_name = "gondola" + desc = "Gondola is the silent walker. \ + Having no hands he embodies the Taoist principle of wu-wei (non-action) while his smiling \ + facial expression shows his utter and complete acceptance of the world as it is. \ + Its hide is extremely valuable." + icon = 'icons/mob/simple/gondolas.dmi' + icon_state = "gondola" + icon_living = "gondola" + + maxHealth = 200 + health = 200 + faction = list(FACTION_GONDOLA) + response_help_continuous = "pets" + response_help_simple = "pet" + response_disarm_continuous = "bops" + response_disarm_simple = "bop" + response_harm_continuous = "kicks" + response_harm_simple = "kick" + ai_controller = /datum/ai_controller/basic_controller/gondola + + //Gondolas aren't affected by cold. + unsuitable_atmos_damage = 0 + basic_mob_flags = DEL_ON_DEATH + + ///List of loot drops on death, since it deletes itself on death (like trooper). + var/list/loot = list( + /obj/effect/decal/cleanable/blood/gibs = 1, + /obj/item/stack/sheet/animalhide/gondola = 1, + /obj/item/food/meat/slab/gondola = 1, + ) + +/mob/living/basic/pet/gondola/Initialize(mapload) + . = ..() + ADD_TRAIT(src, TRAIT_MUTE, INNATE_TRAIT) + AddElement(/datum/element/pet_bonus, "smiles!") + if(LAZYLEN(loot)) + loot = string_list(loot) + AddElement(/datum/element/death_drops, loot) + create_gondola() + +/mob/living/basic/pet/gondola/proc/create_gondola() + icon_state = null + icon_living = null + var/height = GONDOLA_HEIGHT + var/mutable_appearance/body_overlay = mutable_appearance(icon, height) + var/mutable_appearance/eyes_overlay = mutable_appearance(icon, GONDOLA_EYES) + var/mutable_appearance/moustache_overlay = mutable_appearance(icon, GONDOLA_MOUSTACHE) + body_overlay.color = ("#[GONDOLA_COLOR]") + + //Offset the face to match the Gondola's height. + switch(height) + if("gondola_body_medium") + eyes_overlay.pixel_y = -4 + moustache_overlay.pixel_y = -4 + if("gondola_body_short") + eyes_overlay.pixel_y = -8 + moustache_overlay.pixel_y = -8 + + cut_overlays(TRUE) + add_overlay(body_overlay) + add_overlay(eyes_overlay) + add_overlay(moustache_overlay) + +/datum/ai_controller/basic_controller/gondola + blackboard = list( + BB_TARGETING_STRATEGY = /datum/targeting_strategy/basic, + ) + + ai_traits = STOP_MOVING_WHEN_PULLED + ai_movement = /datum/ai_movement/basic_avoidance + idle_behavior = /datum/idle_behavior/idle_random_walk/less_walking + +#undef GONDOLA_HEIGHT +#undef GONDOLA_COLOR +#undef GONDOLA_MOUSTACHE +#undef GONDOLA_EYES diff --git a/code/modules/mob/living/basic/pets/gondolas/gondolapod.dm b/code/modules/mob/living/basic/pets/gondolas/gondolapod.dm new file mode 100644 index 00000000000..da051f18b57 --- /dev/null +++ b/code/modules/mob/living/basic/pets/gondolas/gondolapod.dm @@ -0,0 +1,104 @@ +/mob/living/basic/pet/gondola/gondolapod + name = "gondola" + real_name = "gondola" + desc = "The silent walker. This one seems to be part of a delivery agency." + icon = 'icons/obj/supplypods.dmi' + icon_state = "gondola" + icon_living = "gondola" + SET_BASE_PIXEL(-16, -5) //2x2 sprite + layer = TABLE_LAYER //so that deliveries dont appear underneath it + + loot = list( + /obj/effect/decal/cleanable/blood/gibs = 1, + /obj/item/stack/sheet/animalhide/gondola = 2, + /obj/item/food/meat/slab/gondola = 2, + ) + + ///Boolean on whether the pod is currently open, and should appear such. + var/opened = FALSE + ///The supply pod attached to the gondola, that actually holds the contents of our delivery. + var/obj/structure/closet/supplypod/centcompod/linked_pod + ///Static list of actions the gondola is given on creation, and taken away when it successfully delivers. + var/static/list/gondola_delivering_actions = list( + /datum/action/innate/deliver_gondola_package, + /datum/action/innate/check_gondola_contents, + ) + +/mob/living/basic/pet/gondola/gondolapod/Initialize(mapload, pod) + linked_pod = pod || new(src) + name = linked_pod.name + desc = linked_pod.desc + if(!linked_pod.stay_after_drop || !linked_pod.opened) + grant_actions_by_list(gondola_delivering_actions) + return ..() + +/mob/living/basic/pet/gondola/gondolapod/death() + QDEL_NULL(linked_pod) //Will cause the open() proc for the linked supplypod to be called with the "broken" parameter set to true, meaning that it will dump its contents on death + return ..() + +/mob/living/basic/pet/gondola/gondolapod/create_gondola() + return + +/mob/living/basic/pet/gondola/gondolapod/update_overlays() + . = ..() + if(opened) + . += "[icon_state]_open" + +/mob/living/basic/pet/gondola/gondolapod/examine(mob/user) + . = ..() + if (contents.len) + . += span_notice("It looks like it hasn't made its delivery yet.") + else + . += span_notice("It looks like it has already made its delivery.") + +/mob/living/basic/pet/gondola/gondolapod/setOpened() + opened = TRUE + layer = initial(layer) + update_appearance() + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, setClosed)), 5 SECONDS) + +/mob/living/basic/pet/gondola/gondolapod/setClosed() + opened = FALSE + layer = LOW_MOB_LAYER + update_appearance() + +///Opens the gondola pod and delivers its package, one-time use as it removes all delivery-related actions. +/datum/action/innate/deliver_gondola_package + name = "Deliver" + desc = "Open your pod and release any contents stored within." + button_icon = 'icons/hud/screen_gen.dmi' + button_icon_state = "arrow" + check_flags = AB_CHECK_PHASED + +/datum/action/innate/deliver_gondola_package/Trigger(trigger_flags) + . = ..() + if(!.) + return + + var/mob/living/basic/pet/gondola/gondolapod/gondola_owner = owner + gondola_owner.linked_pod.open_pod(gondola_owner, forced = TRUE) + for(var/datum/action/actions as anything in gondola_owner.actions) + if(actions.type in gondola_owner.gondola_delivering_actions) + actions.Remove(gondola_owner) + return TRUE + +///Checks the contents of the gondola and lets them know what they're holding. +/datum/action/innate/check_gondola_contents + name = "Check contents" + desc = "See how many items you are currently holding in your pod." + button_icon = 'icons/hud/implants.dmi' + button_icon_state = "storage" + check_flags = AB_CHECK_PHASED + +/datum/action/innate/check_gondola_contents/Trigger(trigger_flags) + . = ..() + if(!.) + return + + var/mob/living/basic/pet/gondola/gondolapod/gondola_owner = owner + var/total = gondola_owner.contents.len + if (total) + to_chat(gondola_owner, span_notice("You detect [total] object\s within your incredibly vast belly.")) + else + to_chat(gondola_owner, span_notice("A closer look inside yourself reveals... nothing.")) + return TRUE diff --git a/code/modules/mob/living/simple_animal/friendly/gondola.dm b/code/modules/mob/living/simple_animal/friendly/gondola.dm deleted file mode 100644 index a914178d08a..00000000000 --- a/code/modules/mob/living/simple_animal/friendly/gondola.dm +++ /dev/null @@ -1,69 +0,0 @@ -#define GONDOLA_HEIGHT pick("gondola_body_long", "gondola_body_medium", "gondola_body_short") -#define GONDOLA_COLOR pick("A87855", "915E48", "683E2C") -#define GONDOLA_MOUSTACHE pick("gondola_moustache_large", "gondola_moustache_small") -#define GONDOLA_EYES pick("gondola_eyes_close", "gondola_eyes_far") - -//Gondolas - -/mob/living/simple_animal/pet/gondola - name = "gondola" - real_name = "gondola" - desc = "Gondola is the silent walker. Having no hands he embodies the Taoist principle of wu-wei (non-action) while his smiling facial expression shows his utter and complete acceptance of the world as it is. Its hide is extremely valuable." - response_help_continuous = "pets" - response_help_simple = "pet" - response_disarm_continuous = "bops" - response_disarm_simple = "bop" - response_harm_continuous = "kicks" - response_harm_simple = "kick" - faction = list(FACTION_GONDOLA) - turns_per_move = 10 - icon = 'icons/mob/simple/gondolas.dmi' - icon_state = "gondola" - icon_living = "gondola" - loot = list(/obj/effect/decal/cleanable/blood/gibs, /obj/item/stack/sheet/animalhide/gondola = 1, /obj/item/food/meat/slab/gondola = 1) - //Gondolas aren't affected by cold. - atmos_requirements = null - minbodytemp = 0 - maxbodytemp = 1500 - maxHealth = 200 - health = 200 - del_on_death = TRUE - - //Gondolas don't make footstep sounds - -/mob/living/simple_animal/pet/gondola/Initialize(mapload) - . = ..() - AddElement(/datum/element/pet_bonus, "smiles!") - if (!(istype(src, /mob/living/simple_animal/pet/gondola/gondolapod))) - CreateGondola() - -/mob/living/simple_animal/pet/gondola/proc/CreateGondola() - icon_state = null - icon_living = null - var/height = GONDOLA_HEIGHT - var/mutable_appearance/body_overlay = mutable_appearance(icon, height) - var/mutable_appearance/eyes_overlay = mutable_appearance(icon, GONDOLA_EYES) - var/mutable_appearance/moustache_overlay = mutable_appearance(icon, GONDOLA_MOUSTACHE) - body_overlay.color = ("#[GONDOLA_COLOR]") - - //Offset the face to match the Gondola's height. - switch(height) - if("gondola_body_medium") - eyes_overlay.pixel_y = -4 - moustache_overlay.pixel_y = -4 - if("gondola_body_short") - eyes_overlay.pixel_y = -8 - moustache_overlay.pixel_y = -8 - - cut_overlays(TRUE) - add_overlay(body_overlay) - add_overlay(eyes_overlay) - add_overlay(moustache_overlay) - -/mob/living/simple_animal/pet/gondola/can_speak(allow_mimes = FALSE) - return FALSE // Gondolas are the silent walker. - -#undef GONDOLA_HEIGHT -#undef GONDOLA_COLOR -#undef GONDOLA_MOUSTACHE -#undef GONDOLA_EYES diff --git a/code/modules/mob/living/simple_animal/friendly/pet.dm b/code/modules/mob/living/simple_animal/friendly/pet.dm deleted file mode 100644 index 084ce1577e4..00000000000 --- a/code/modules/mob/living/simple_animal/friendly/pet.dm +++ /dev/null @@ -1,140 +0,0 @@ -/mob/living/simple_animal/pet - icon = 'icons/mob/simple/pets.dmi' - mob_size = MOB_SIZE_SMALL - mob_biotypes = MOB_ORGANIC|MOB_BEAST - blood_volume = BLOOD_VOLUME_NORMAL - - /// if the mob is protected from being renamed by collars. - var/unique_pet = FALSE - /// If the mob has collar sprites, this is the base of the icon states. - var/collar_icon_state - /// We have a seperate _rest collar icon state when the pet is resting. - var/has_collar_resting_icon_state = FALSE - - /// Our collar - var/obj/item/clothing/neck/petcollar/collar - -/mob/living/simple_animal/pet/Initialize(mapload) - . = ..() - - /// Can set the collar var beforehand to start the pet with a collar. - if(collar) - collar = new(src) - - update_icon(UPDATE_OVERLAYS) - -/mob/living/simple_animal/pet/Destroy() - . = ..() - - QDEL_NULL(collar) - QDEL_NULL(access_card) - -/mob/living/simple_animal/pet/attackby(obj/item/thing, mob/user, params) - if(istype(thing, /obj/item/clothing/neck/petcollar) && !collar) - add_collar(thing, user) - return TRUE - - if(istype(thing, /obj/item/newspaper) && !stat) - user.visible_message(span_notice("[user] baps [name] on the nose with the rolled up [thing].")) - dance_rotate(src) - return TRUE - - return ..() - -/mob/living/simple_animal/pet/update_overlays() - . = ..() - - if(!collar || !collar_icon_state) - return - - // Determine which status tag to add to the middle of the icon state. - var/dead_tag = stat == DEAD ? "_dead" : null - var/rest_tag = has_collar_resting_icon_state && resting ? "_rest" : null - var/stat_tag = dead_tag || rest_tag || "" - - . += mutable_appearance(icon, "[collar_icon_state][stat_tag]collar") - . += mutable_appearance(icon, "[collar_icon_state][stat_tag]tag") - -/mob/living/simple_animal/pet/gib() - . = ..() - - if(access_card) - access_card.forceMove(drop_location()) - access_card = null - - remove_collar(drop_location(), update_visuals = FALSE) - -/mob/living/simple_animal/pet/revive(full_heal_flags = NONE, excess_healing = 0, force_grab_ghost = FALSE) - . = ..() - if(!.) - return - - update_icon(UPDATE_OVERLAYS) - -/mob/living/simple_animal/pet/death(gibbed) - . = ..() - add_memory_in_range(src, 7, /datum/memory/pet_died, deuteragonist = src) //Protagonist is the person memorizing it - -/mob/living/simple_animal/pet/Exited(atom/movable/gone, direction) - . = ..() - - if(gone != collar) - return - - collar = null - - if(QDELETED(src)) - return - - update_icon(UPDATE_OVERLAYS) - -/mob/living/simple_animal/pet/update_stat() - . = ..() - - update_icon(UPDATE_OVERLAYS) - -/mob/living/simple_animal/pet/set_resting(new_resting, silent, instant) - . = ..() - - if(!has_collar_resting_icon_state) - return - - update_icon(UPDATE_OVERLAYS) - -/** - * Add a collar to the pet. - * - * Arguments: - * * new_collar - the collar. - * * user - the user that did it. - */ -/mob/living/simple_animal/pet/proc/add_collar(obj/item/clothing/neck/petcollar/new_collar, mob/user) - if(QDELETED(new_collar) || collar) - return - if(!user.transferItemToLoc(new_collar, src)) - return - - collar = new_collar - if(collar_icon_state) - update_icon(UPDATE_OVERLAYS) - - to_chat(user, span_notice("You put [new_collar] around [src]'s neck.")) - if(new_collar.tagname && !unique_pet) - fully_replace_character_name(null, "\proper [new_collar.tagname]") - -/** - * Remove the collar from the pet. - */ -/mob/living/simple_animal/pet/proc/remove_collar(atom/new_loc, update_visuals = TRUE) - if(!collar) - return - - var/obj/old_collar = collar - - collar.forceMove(new_loc) - collar = null - - if(collar_icon_state && update_visuals) - update_icon(UPDATE_OVERLAYS) - - return old_collar diff --git a/code/modules/unit_tests/mob_faction.dm b/code/modules/unit_tests/mob_faction.dm index 359ec40f66f..554a1adda9d 100644 --- a/code/modules/unit_tests/mob_faction.dm +++ b/code/modules/unit_tests/mob_faction.dm @@ -9,7 +9,6 @@ /mob/oranges_ear ) ignored += typesof(/mob/camera/imaginary_friend) - ignored += typesof(/mob/living/simple_animal/pet/gondola/gondolapod) ignored += typesof(/mob/living/silicon/robot/model) ignored += typesof(/mob/camera/ai_eye/remote/base_construction) ignored += typesof(/mob/camera/ai_eye/remote/shuttle_docker) diff --git a/code/modules/unit_tests/simple_animal_freeze.dm b/code/modules/unit_tests/simple_animal_freeze.dm index e9476e6d840..761ee79216d 100644 --- a/code/modules/unit_tests/simple_animal_freeze.dm +++ b/code/modules/unit_tests/simple_animal_freeze.dm @@ -74,10 +74,6 @@ /mob/living/simple_animal/hostile/retaliate/goose/vomit, /mob/living/simple_animal/hostile/vatbeast, /mob/living/simple_animal/hostile/zombie, - /mob/living/simple_animal/pet, - /mob/living/simple_animal/pet/gondola, - /mob/living/simple_animal/pet/gondola/gondolapod, - /mob/living/simple_animal/pet/gondola/virtual_domain, /mob/living/simple_animal/soulscythe, // DO NOT ADD NEW ENTRIES TO THIS LIST // READ THE COMMENT ABOVE diff --git a/code/modules/unit_tests/strange_reagent.dm b/code/modules/unit_tests/strange_reagent.dm index ac8ad5cb6df..e5e385b86fd 100644 --- a/code/modules/unit_tests/strange_reagent.dm +++ b/code/modules/unit_tests/strange_reagent.dm @@ -15,7 +15,6 @@ /mob/living/simple_animal, /mob/living/basic, )) - types_to_check -= /mob/living/simple_animal/pet/gondola/gondolapod // need a pod, which we don't have types_to_check -= typesof(/mob/living/simple_animal/hostile/megafauna) // no types_to_check -= typesof(/mob/living/basic/mouse) // qdel themselves on death; why dont they use DEL_ON_DEATH you might ask. I-unno types_to_check -= typesof(/mob/living/basic/slime) // if they roll the 50% chance to spawn as an adult, they can just at random split and qdel themselves diff --git a/code/modules/unit_tests/unit_test.dm b/code/modules/unit_tests/unit_test.dm index 9a6f89fddc3..afce8392d58 100644 --- a/code/modules/unit_tests/unit_test.dm +++ b/code/modules/unit_tests/unit_test.dm @@ -276,8 +276,6 @@ GLOBAL_VAR_INIT(focused_tests, focused_tests()) returnable_list += typesof(/obj/effect/baseturf_helper) //No tauma to pass in returnable_list += typesof(/mob/camera/imaginary_friend) - //No pod to gondola - returnable_list += typesof(/mob/living/simple_animal/pet/gondola/gondolapod) //No heart to give returnable_list += typesof(/obj/structure/ethereal_crystal) //No linked console diff --git a/tgstation.dme b/tgstation.dme index 95cd01adbe8..5d4b55e1a73 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3572,7 +3572,6 @@ #include "code\modules\cargo\coupon.dm" #include "code\modules\cargo\exports.dm" #include "code\modules\cargo\expressconsole.dm" -#include "code\modules\cargo\gondolapod.dm" #include "code\modules\cargo\goodies.dm" #include "code\modules\cargo\materials_market.dm" #include "code\modules\cargo\order.dm" @@ -4798,6 +4797,8 @@ #include "code\modules\mob\living\basic\pets\dog\corgi.dm" #include "code\modules\mob\living\basic\pets\dog\dog_subtypes.dm" #include "code\modules\mob\living\basic\pets\dog\strippable_items.dm" +#include "code\modules\mob\living\basic\pets\gondolas\gondola.dm" +#include "code\modules\mob\living\basic\pets\gondolas\gondolapod.dm" #include "code\modules\mob\living\basic\pets\orbie\orbie.dm" #include "code\modules\mob\living\basic\pets\orbie\orbie_abilities.dm" #include "code\modules\mob\living\basic\pets\orbie\orbie_ai.dm" @@ -5087,8 +5088,6 @@ #include "code\modules\mob\living\simple_animal\bot\secbot.dm" #include "code\modules\mob\living\simple_animal\bot\SuperBeepsky.dm" #include "code\modules\mob\living\simple_animal\bot\vibebot.dm" -#include "code\modules\mob\living\simple_animal\friendly\gondola.dm" -#include "code\modules\mob\living\simple_animal\friendly\pet.dm" #include "code\modules\mob\living\simple_animal\hostile\dark_wizard.dm" #include "code\modules\mob\living\simple_animal\hostile\hostile.dm" #include "code\modules\mob\living\simple_animal\hostile\illusion.dm" diff --git a/tools/UpdatePaths/Scripts/83451_basic_gondola.txt b/tools/UpdatePaths/Scripts/83451_basic_gondola.txt new file mode 100644 index 00000000000..893890cc8e4 --- /dev/null +++ b/tools/UpdatePaths/Scripts/83451_basic_gondola.txt @@ -0,0 +1,2 @@ +/mob/living/simple_animal/pet/gondola : /mob/living/basic/pet/gondola{@OLD} +/mob/living/simple_animal/pet/gondola/@SUBTYPES : /mob/living/basic/pet/gondola/@SUBTYPES{@OLD}