From f76bb27127290fc19c2a43c88a0e0607675aeb51 Mon Sep 17 00:00:00 2001 From: Poojawa Date: Thu, 8 Aug 2019 21:33:42 -0500 Subject: [PATCH] Fixes some runtimes and removes a holodeck exploit and a cleanup >.>; --- code/__DEFINES/subsystems.dm | 1 + code/controllers/subsystem/vore.dm | 2 +- code/game/world.dm | 5 +- code/modules/holodeck/holo_effect.dm | 10 ++-- .../living/simple_animal/simple_animal_vr.dm | 3 ++ code/modules/surgery/bodyparts/bodyparts.dm | 3 +- .../code/datums/mood_events/moodular.dm | 20 ++------ .../simple_animal/simplemob_vore_values.dm | 48 +++++++++++++++++++ .../code/modules/vore/eating/belly_obj_vr.dm | 10 ++-- .../code/modules/vore/eating/bellymodes_vr.dm | 10 +++- 10 files changed, 82 insertions(+), 30 deletions(-) diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 19d0540e0e..3394fba90c 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -93,6 +93,7 @@ #define FIRE_PRIORITY_SERVER_MAINT 10 #define FIRE_PRIORITY_RESEARCH 10 #define FIRE_PRIORITY_VIS 10 +#define FIRE_PRIORITY_VORE 10 #define FIRE_PRIORITY_GARBAGE 15 #define FIRE_PRIORITY_WET_FLOORS 20 #define FIRE_PRIORITY_AIR 20 diff --git a/code/controllers/subsystem/vore.dm b/code/controllers/subsystem/vore.dm index faaa297ca3..ca34f9ab61 100644 --- a/code/controllers/subsystem/vore.dm +++ b/code/controllers/subsystem/vore.dm @@ -7,7 +7,7 @@ SUBSYSTEM_DEF(bellies) name = "Bellies" - priority = 5 + priority = FIRE_PRIORITY_VORE wait = 1 SECONDS flags = SS_KEEP_TIMING|SS_NO_INIT runlevels = RUNLEVEL_GAME|RUNLEVEL_POSTGAME diff --git a/code/game/world.dm b/code/game/world.dm index dedf822597..e9c8433006 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -137,7 +137,7 @@ GLOBAL_VAR(restart_counter) // but those are both private, so let's put the commit info in the runtime // log which is ultimately public. log_runtime(GLOB.revdata.get_log_message()) - + /world/Topic(T, addr, master, key) TGS_TOPIC //redirect to server tools if necessary @@ -270,7 +270,8 @@ GLOBAL_VAR(restart_counter) if (M.client) n++ - features += "[SSmapping.config.map_name]" //CIT CHANGE - makes the hub entry display the current map + if(SSmapping.config) // this just stops the runtime, honk. + features += "[SSmapping.config.map_name]" //CIT CHANGE - makes the hub entry display the current map if(get_security_level())//CIT CHANGE - makes the hub entry show the security level features += "[get_security_level()] alert" diff --git a/code/modules/holodeck/holo_effect.dm b/code/modules/holodeck/holo_effect.dm index fee0b2b7c9..707d650608 100644 --- a/code/modules/holodeck/holo_effect.dm +++ b/code/modules/holodeck/holo_effect.dm @@ -87,10 +87,10 @@ /obj/effect/holodeck_effect/mobspawner/pet mobtype = list( - /mob/living/simple_animal/butterfly, /mob/living/simple_animal/chick/holo, - /mob/living/simple_animal/pet/cat, /mob/living/simple_animal/pet/cat/kitten, - /mob/living/simple_animal/pet/dog/corgi, /mob/living/simple_animal/pet/dog/corgi/puppy, - /mob/living/simple_animal/pet/dog/pug, /mob/living/simple_animal/pet/fox) + /mob/living/simple_animal/butterfly/holo, /mob/living/simple_animal/chick/holo, + /mob/living/simple_animal/pet/cat/holo, /mob/living/simple_animal/pet/cat/kitten/holo, + /mob/living/simple_animal/pet/dog/corgi/holo, /mob/living/simple_animal/pet/dog/corgi/puppy/holo, + /mob/living/simple_animal/pet/dog/pug/holo, /mob/living/simple_animal/pet/fox/holo) /obj/effect/holodeck_effect/mobspawner/bee mobtype = /mob/living/simple_animal/hostile/poison/bees/toxin @@ -100,7 +100,7 @@ /obj/effect/holodeck_effect/mobspawner/penguin mobtype = /mob/living/simple_animal/pet/penguin/emperor - + /obj/effect/holodeck_effect/mobspawner/penguin/Initialize() if(prob(1)) mobtype = /mob/living/simple_animal/pet/penguin/emperor/shamebrero diff --git a/code/modules/mob/living/simple_animal/simple_animal_vr.dm b/code/modules/mob/living/simple_animal/simple_animal_vr.dm index 41ece5ed06..1e8f4c768f 100644 --- a/code/modules/mob/living/simple_animal/simple_animal_vr.dm +++ b/code/modules/mob/living/simple_animal/simple_animal_vr.dm @@ -9,6 +9,7 @@ var/list/prey_excludes = list() //For excluding people from being eaten. var/voracious_chance = VORACIOUS_CHANCE //Mob AI Engagement probability when rolling between regular melee strike and a vore attempt, default 40% + var/holodeck = FALSE // Vore belly interactions // Most mobs are only going to have the one gut. Multi-gut set ups should refer to Ash Drake's dragon_vore.dm for set up. @@ -49,6 +50,8 @@ // Simple animals have only one belly. This creates it (if it isn't already set up) /mob/living/simple_animal/init_vore() vore_init = TRUE + if(holodeck) //hacky dumbshit, but I can't get it to work right anyway + return if(vore_organs.len) return if(no_vore) //If it can't vore, let's not give it a stomach. diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/bodyparts.dm index a97a133685..81b491e6de 100644 --- a/code/modules/surgery/bodyparts/bodyparts.dm +++ b/code/modules/surgery/bodyparts/bodyparts.dm @@ -354,7 +354,8 @@ if("mam_body_markings" in S.default_features) var/datum/sprite_accessory/Smark Smark = GLOB.mam_body_markings_list[H.dna.features["mam_body_markings"]] - body_markings_icon = Smark.icon + if(Smark) + body_markings_icon = Smark.icon if(H.dna.features.["mam_body_markings"] != "None") body_markings = lowertext(H.dna.features.["mam_body_markings"]) auxmarking = lowertext(H.dna.features.["mam_body_markings"]) diff --git a/modular_citadel/code/datums/mood_events/moodular.dm b/modular_citadel/code/datums/mood_events/moodular.dm index b53ce417e8..aa87f1b97a 100644 --- a/modular_citadel/code/datums/mood_events/moodular.dm +++ b/modular_citadel/code/datums/mood_events/moodular.dm @@ -3,9 +3,7 @@ // box of hugs /obj/item/storage/box/hug/attack_self(mob/user) . = ..() - GET_COMPONENT_FROM(mood, /datum/component/mood, user) - if(mood) - mood.add_event("hugbox", /datum/mood_event/hugbox) + SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT,"hugbox", /datum/mood_event/hugbox) //Removed headpats here, duplicate code? @@ -13,25 +11,17 @@ /obj/item/toy/plush/attack_self(mob/user) . = ..() if(stuffed || grenade) - GET_COMPONENT_FROM(mood, /datum/component/mood, user) - if(mood) - mood.add_event("plushpet", /datum/mood_event/plushpet) + SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT,"plushpet", /datum/mood_event/plushpet) else - GET_COMPONENT_FROM(mood, /datum/component/mood, user) - if(mood) - mood.add_event("plush_nostuffing", /datum/mood_event/plush_nostuffing) + SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT,"plush_nostuffing", /datum/mood_event/plush_nostuffing) // Jack the Ripper starring plush /obj/item/toy/plush/attackby(obj/item/I, mob/living/user, params) . = ..() if(I.is_sharp()) if(!grenade) - GET_COMPONENT_FROM(mood, /datum/component/mood, user) - if(mood) - mood.add_event("plushjack", /datum/mood_event/plushjack) + SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT,"plushjack", /datum/mood_event/plushjack) // plush playing (plush-on-plush action) if(istype(I, /obj/item/toy/plush)) - GET_COMPONENT_FROM(mood, /datum/component/mood, user) - if(mood) - mood.add_event("plushplay", /datum/mood_event/plushplay) + SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT,"plushplay", /datum/mood_event/plushplay) diff --git a/modular_citadel/code/modules/mob/living/simple_animal/simplemob_vore_values.dm b/modular_citadel/code/modules/mob/living/simple_animal/simplemob_vore_values.dm index 78e18fdb5e..78f11e0a41 100644 --- a/modular_citadel/code/modules/mob/living/simple_animal/simplemob_vore_values.dm +++ b/modular_citadel/code/modules/mob/living/simple_animal/simplemob_vore_values.dm @@ -133,3 +133,51 @@ vore_active = TRUE isPredator = TRUE vore_default_mode = DM_DIGEST + +/mob/living/simple_animal/butterfly/holo + holodeck = TRUE + feeding = FALSE + devourable = FALSE + digestable = FALSE + +/mob/living/simple_animal/chick/holo + holodeck = TRUE + feeding = FALSE + devourable = FALSE + digestable = FALSE + +/mob/living/simple_animal/pet/cat/holo + holodeck = TRUE + feeding = FALSE + devourable = FALSE + digestable = FALSE + +/mob/living/simple_animal/pet/cat/kitten/holo + holodeck = TRUE + feeding = FALSE + devourable = FALSE + digestable = FALSE + +/mob/living/simple_animal/pet/dog/corgi/holo + holodeck = TRUE + feeding = FALSE + devourable = FALSE + digestable = FALSE + +/mob/living/simple_animal/pet/dog/corgi/puppy/holo + holodeck = TRUE + feeding = FALSE + devourable = FALSE + digestable = FALSE + +/mob/living/simple_animal/pet/dog/pug/holo + holodeck = TRUE + feeding = FALSE + devourable = FALSE + digestable = FALSE + +/mob/living/simple_animal/pet/fox/holo + holodeck = TRUE + feeding = FALSE + devourable = FALSE + digestable = FALSE diff --git a/modular_citadel/code/modules/vore/eating/belly_obj_vr.dm b/modular_citadel/code/modules/vore/eating/belly_obj_vr.dm index c4b2fbf5b1..1ad29c1af3 100644 --- a/modular_citadel/code/modules/vore/eating/belly_obj_vr.dm +++ b/modular_citadel/code/modules/vore/eating/belly_obj_vr.dm @@ -152,11 +152,13 @@ SSbellies.belly_list += src /obj/belly/Destroy() - SSbellies.belly_list -= src if(owner) - owner.vore_organs -= src - owner = null - . = ..() + Remove(owner) + return ..() + +/obj/belly/proc/Remove(mob/living/owner) + owner.vore_organs -= src + owner = null // Called whenever an atom enters this belly /obj/belly/Entered(var/atom/movable/thing,var/atom/OldLoc) diff --git a/modular_citadel/code/modules/vore/eating/bellymodes_vr.dm b/modular_citadel/code/modules/vore/eating/bellymodes_vr.dm index 9356c25f57..da323f02e2 100644 --- a/modular_citadel/code/modules/vore/eating/bellymodes_vr.dm +++ b/modular_citadel/code/modules/vore/eating/bellymodes_vr.dm @@ -4,10 +4,16 @@ recent_sound = FALSE return SSBELLIES_IGNORED + if(!owner) + qdel(src) + SSbellies.belly_list -= src + return SSBELLIES_PROCESSED + if(loc != owner) - if(istype(owner)) - loc = owner + if(isliving(owner)) //we don't have machine based bellies. (yet :honk:) + forceMove(owner) else + SSbellies.belly_list -= src qdel(src) return SSBELLIES_PROCESSED