From 0b9a58dd54ac4b3d27c4291a89d34f048d566b0f Mon Sep 17 00:00:00 2001 From: SomeGuyEatingPie Date: Wed, 18 May 2022 20:09:25 +0100 Subject: [PATCH] Copied hyper code Copied code from hyper --- code/__DEFINES/citadel_defines.dm | 1 + code/__DEFINES/traits.dm | 1 + code/_globalvars/lists/maintenance_loot.dm | 3 ++- code/datums/elements/trash.dm | 23 ++++++++++++++++++++++ code/datums/traits/neutral.dm | 8 ++++++++ code/game/objects/items/trash.dm | 4 ++++ code/modules/client/preferences.dm | 3 +++ tgstation.dme | 1 + 8 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 code/datums/elements/trash.dm diff --git a/code/__DEFINES/citadel_defines.dm b/code/__DEFINES/citadel_defines.dm index fdfd8110..859824ee 100644 --- a/code/__DEFINES/citadel_defines.dm +++ b/code/__DEFINES/citadel_defines.dm @@ -131,6 +131,7 @@ #define MEDIHOUND_SLEEPER (1<<0) #define EATING_NOISES (1<<1) #define DIGESTION_NOISES (1<<2) +#define TRASH_FORCEFEED (1<<3) #define TOGGLES_CITADEL (EATING_NOISES|DIGESTION_NOISES) diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 4ebd447c..06b569f1 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -194,6 +194,7 @@ #define TRAIT_NEVER_CLONE "donotclone" #define TRAIT_COLDBLOODED "coldblooded" // Your body is literal room temperature. Does not make you immune to the temp. #define TRAIT_FLIMSY "flimsy" //you have 20% less maxhealth +#define TRAIT_TRASHCAN "trashcan" //Im the TRASH MAN! (Shamlessly stolen from hyper for local trash eater, flint) //Hyper diff --git a/code/_globalvars/lists/maintenance_loot.dm b/code/_globalvars/lists/maintenance_loot.dm index 8baf695f..d965faf6 100644 --- a/code/_globalvars/lists/maintenance_loot.dm +++ b/code/_globalvars/lists/maintenance_loot.dm @@ -119,7 +119,8 @@ GLOBAL_LIST_INIT(maintenance_loot, list( /obj/item/autosurgeon/breasts = 1, /obj/item/autosurgeon/womb = 1, /obj/item/toy/plush/random = 1, - /obj/item/grenade/spawnergrenade/clustaur = 1 + /obj/item/grenade/spawnergrenade/clustaur = 1, + /obj/effect/spawner/lootdrop/grille_or_trash = 5 )) GLOBAL_LIST_INIT(ratking_trash, list(//Garbage: used by the regal rat mob when spawning garbage. diff --git a/code/datums/elements/trash.dm b/code/datums/elements/trash.dm new file mode 100644 index 00000000..71cf2e66 --- /dev/null +++ b/code/datums/elements/trash.dm @@ -0,0 +1,23 @@ +/datum/element/trash //stolen from hyper so flint can eat garbo + element_flags = ELEMENT_DETACH + +/datum/element/trash/Attach(datum/target) + . = ..() + RegisterSignal(target, COMSIG_ITEM_ATTACK, .proc/UseFromHand) + +/datum/element/trash/proc/UseFromHand(obj/item/source, mob/living/M, mob/living/user) + if((M == user || M.client?.prefs.cit_toggles & TRASH_FORCEFEED) && ishuman(user)) + var/mob/living/carbon/human/H = M + if(HAS_TRAIT(H, TRAIT_TRASHCAN)) + playsound(H.loc,'sound/items/eatfood.ogg', rand(10,50), 1) + if(H.vore_selected) + if(M != user) + H.visible_message("[user] forces the [source] into [H]'s [H.vore_selected]", + "[user] forces the [source] into your [H.vore_selected]") + else + H.visible_message("[H] [H.vore_selected.vore_verb]s the [source] into their [H.vore_selected]", + "You [H.vore_selected.vore_verb] the [source] into your [H.vore_selected]") + source.forceMove(H.vore_selected) + else + H.visible_message("[H] consumes the [source].") + qdel(source) diff --git a/code/datums/traits/neutral.dm b/code/datums/traits/neutral.dm index 10f7d9d1..548cd4ae 100644 --- a/code/datums/traits/neutral.dm +++ b/code/datums/traits/neutral.dm @@ -177,3 +177,11 @@ wheels.setDir(spawn_chair.dir) wheels.buckle_mob(quirk_holder) + +/datum/quirk/trashcan //for when you are literally flint (Stolen from hyper) + name = "Trashcan" + desc = "You are able to consume and digest trash." + value = 0 + gain_text = "You feel like munching on a can of soda." + lose_text = "You no longer feel like you should be eating trash." + mob_trait = TRAIT_TRASHCAN diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm index f21b2601..a236cfc5 100644 --- a/code/game/objects/items/trash.dm +++ b/code/game/objects/items/trash.dm @@ -7,6 +7,10 @@ w_class = WEIGHT_CLASS_TINY resistance_flags = FLAMMABLE +/obj/item/trash/Initialize() //stolen from hyper for trash eating + . = ..() + AddElement(/datum/element/trash) + /obj/item/trash/raisins name = "\improper 4no raisins" icon_state= "4no_raisins" diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 479af0af..3f0ba250 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1011,6 +1011,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "Voracious MediHound sleepers: [(cit_toggles & MEDIHOUND_SLEEPER) ? "Yes" : "No"]
" dat += "Hear Vore Sounds: [(cit_toggles & EATING_NOISES) ? "Yes" : "No"]
" dat += "Hear Vore Digestion Sounds: [(cit_toggles & DIGESTION_NOISES) ? "Yes" : "No"]
" + dat += "Allow trash forcefeeding (requires Trashcan quirk) [(cit_toggles & TRASH_FORCEFEED) ? "Yes" : "No"]
" dat += "Lewdchem:[lewdchem == TRUE ? "Enabled" : "Disabled"]
" dat += "Widescreen: [widescreenpref ? "Enabled ([CONFIG_GET(string/default_view)])" : "Disabled (15x15)"]
" dat += "Auto stand: [autostand ? "Enabled" : "Disabled"]
" @@ -2718,6 +2719,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("toggledigestionnoise") cit_toggles ^= DIGESTION_NOISES + if("toggleforcefeedtrash") //gs13 added for flint + cit_toggles ^= TRASH_FORCEFEED //END CITADEL EDIT if("ambientocclusion") diff --git a/tgstation.dme b/tgstation.dme index 3e090c81..c3a9558e 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -479,6 +479,7 @@ #include "code\datums\elements\mob_holder.dm" #include "code\datums\elements\squish.dm" #include "code\datums\elements\swimming.dm" +#include "code\datums\elements\trash.dm" #include "code\datums\elements\wuv.dm" #include "code\datums\helper_datums\events.dm" #include "code\datums\helper_datums\getrev.dm"