diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index eb44d9a94d0..53e76f0719f 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -63,8 +63,10 @@ if(!force) playsound(loc, 'sound/weapons/tap.ogg', get_clamped_volume(), 1, -1) - else if(hitsound) - playsound(loc, hitsound, get_clamped_volume(), 1, -1) + else + SEND_SIGNAL(M, COMSIG_ITEM_ATTACK) + if(hitsound) + playsound(loc, hitsound, get_clamped_volume(), 1, -1) user.lastattacked = M M.lastattacker = user diff --git a/code/datums/components/jestosterone.dm b/code/datums/components/jestosterone.dm new file mode 100644 index 00000000000..f37f1f03efb --- /dev/null +++ b/code/datums/components/jestosterone.dm @@ -0,0 +1,5 @@ +/datum/component/jestosterone + var/mind_type //Is the affected mob a clown / mime? + +/datum/component/jestosterone/Initialize(mind_type_arg) + mind_type = mind_type_arg diff --git a/code/datums/components/squeak.dm b/code/datums/components/squeak.dm index e9b6bb6e42a..3fe88f7d0e9 100644 --- a/code/datums/components/squeak.dm +++ b/code/datums/components/squeak.dm @@ -14,7 +14,7 @@ var/last_use = 0 var/use_delay = 20 -/datum/component/squeak/Initialize(custom_sounds, volume_override, chance_override, step_delay_override, use_delay_override) +/datum/component/squeak/Initialize(custom_sounds, volume_override, chance_override, step_delay_override, use_delay_override, squeak_on_move) if(!isatom(parent)) return COMPONENT_INCOMPATIBLE RegisterSignal(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY), .proc/play_squeak) @@ -22,6 +22,8 @@ RegisterSignal(parent, list(COMSIG_MOVABLE_BUMP, COMSIG_MOVABLE_IMPACT), .proc/play_squeak) RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, .proc/play_squeak_crossed) RegisterSignal(parent, COMSIG_MOVABLE_DISPOSING, .proc/disposing_react) + if(squeak_on_move) + RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/play_squeak) if(isitem(parent)) RegisterSignal(parent, list(COMSIG_ITEM_ATTACK, COMSIG_ITEM_ATTACK_OBJ, COMSIG_ITEM_HIT_REACT), .proc/play_squeak) RegisterSignal(parent, COMSIG_ITEM_ATTACK_SELF, .proc/use_squeak) @@ -47,12 +49,15 @@ else playsound(parent, pickweight(override_squeak_sounds), volume, 1, -1) -/datum/component/squeak/proc/step_squeak() - if(steps > step_delay) - play_squeak() - steps = 0 +/datum/component/squeak/proc/step_squeak(datum/source, mob/living/carbon/human/H) + if(H.m_intent == MOVE_INTENT_RUN) + if(steps > step_delay) + play_squeak() + steps = 0 + else + steps++ else - steps++ + play_squeak() /datum/component/squeak/proc/on_equip(datum/source, mob/equipper, slot) RegisterSignal(equipper, COMSIG_MOVABLE_DISPOSING, .proc/disposing_react, TRUE) diff --git a/code/modules/admin/verbs/honksquad.dm b/code/modules/admin/verbs/honksquad.dm index c9068049c75..ce1803c2067 100644 --- a/code/modules/admin/verbs/honksquad.dm +++ b/code/modules/admin/verbs/honksquad.dm @@ -119,6 +119,7 @@ var/global/sent_honksquad = 0 equip_to_slot_or_del(new /obj/item/stamp/clown(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/toy/crayon/rainbow(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/reagent_containers/spray/waterflower(src), slot_in_backpack) + equip_to_slot_or_del(new /obj/item/reagent_containers/food/pill/patch/jestosterone(src), slot_r_store) if(prob(50)) equip_to_slot_or_del(new /obj/item/gun/energy/clown(src), slot_in_backpack) else diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 4d97ddfd78a..2ea891d04f9 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -121,12 +121,10 @@ span = mind.speech_span if((COMIC in mutations) \ || (locate(/obj/item/organ/internal/cyberimp/brain/clown_voice) in internal_organs) \ - || istype(get_item_by_slot(slot_wear_mask), /obj/item/clothing/mask/gas/voice/clown)) + || istype(get_item_by_slot(slot_wear_mask), /obj/item/clothing/mask/gas/voice/clown) \ + || GetComponent(/datum/component/jestosterone)) span = "sans" - if(WINGDINGS in mutations) - span = "wingdings" - var/list/parent = ..() verb = parent["verb"] diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index bc276b05b00..d07ef2b9f32 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -381,7 +381,6 @@ playsound(target.loc, attack.attack_sound, 25, 1, -1) target.visible_message("[user] [pick(attack.attack_verb)]ed [target]!") - target.apply_damage(damage, BRUTE, affecting, armor_block, sharp = attack.sharp) //moving this back here means Armalis are going to knock you down 70% of the time, but they're pure adminbus anyway. if((target.stat != DEAD) && damage >= user.dna.species.punchstunthreshold) target.visible_message("[user] has weakened [target]!", \ @@ -390,6 +389,7 @@ target.forcesay(GLOB.hit_appends) else if(target.lying) target.forcesay(GLOB.hit_appends) + SEND_SIGNAL(target, COMSIG_PARENT_ATTACKBY) /datum/species/proc/disarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) if(target.check_block()) //cqc diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 25380d26fb2..cfb16c0f04a 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -508,6 +508,7 @@ var/turf/T = loc . = ..() if(.) + SEND_SIGNAL(src, COMSIG_MOVABLE_MOVED) handle_footstep(loc) step_count++ @@ -882,7 +883,7 @@ // If we're pulling something then drop what we're currently pulling and pull this instead. AM.add_fingerprint(src) if(pulling) - if(AM == pulling)// Are we trying to pull something we are already pulling? Then just stop here, no need to continue. + if(AM == pulling)// Are we trying to pull something we are already pulling? Then just stop here, no need to continue. return stop_pulling() if(AM.pulledby) diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index cbe8c43b936..b04cbd9494f 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -577,9 +577,9 @@ var/const/INGEST = 2 reagent_list += R R.holder = src R.volume = amount + R.on_new(data) if(data) R.data = data - R.on_new(data) update_total() if(my_atom) diff --git a/code/modules/reagents/chemistry/reagents/misc.dm b/code/modules/reagents/chemistry/reagents/misc.dm index 02e8d1da21c..031732b65cc 100644 --- a/code/modules/reagents/chemistry/reagents/misc.dm +++ b/code/modules/reagents/chemistry/reagents/misc.dm @@ -419,6 +419,70 @@ /datum/reagent/love/reaction_mob(mob/living/M, method=TOUCH, volume) to_chat(M, "You feel loved!") +/datum/reagent/jestosterone //Formerly known as Nitrogen tungstide hypochlorite before NT fired the chemists for trying to be funny + name = "Jestosterone" + id = "jestosterone" + description = "Jestosterone is an odd chemical compound that induces a variety of annoying side-effects in the average person. It also causes mild intoxication, and is toxic to mimes." + color = "#ff00ff" //Fuchsia, pity we can't do rainbow here + taste_message = "a funny flavour" + +/datum/reagent/jestosterone/on_new() + ..() + var/mob/living/carbon/C = holder.my_atom + if(!istype(C)) + return + var/mind_type = FALSE + if(C.mind) + if(C.mind.assigned_role == "Clown" || C.mind.assigned_role == SPECIAL_ROLE_HONKSQUAD) + mind_type = "Clown" + to_chat(C, "Whatever that was, it feels great!") + else if(C.mind.assigned_role == "Mime") + mind_type = "Mime" + to_chat(C, "You feel nauseous.") + C.AdjustDizzy(volume) + else + to_chat(C, "Something doesn't feel right...") + C.AdjustDizzy(volume) + C.AddComponent(/datum/component/jestosterone, mind_type) + C.AddComponent(/datum/component/squeak, null, null, null, null, null, TRUE) + +/datum/reagent/jestosterone/on_mob_life(mob/living/carbon/M) + if(!istype(M)) + return ..() + var/update_flags = STATUS_UPDATE_NONE + if(prob(10)) + M.emote("giggle") + GET_COMPONENT_FROM(jestosterone_component, /datum/component/jestosterone, M) + if(jestosterone_component.mind_type == "Clown") + update_flags |= M.adjustBruteLoss(-1.5 * REAGENTS_EFFECT_MULTIPLIER) //Screw those pesky clown beatings! + else + M.AdjustDizzy(10, 0, 500) + M.Druggy(15) + if(prob(10)) + M.EyeBlurry(5) + if(prob(6)) + var/list/clown_message = list("You feel light-headed.", + "You can't see straight.", + "You feel about as funny as the station clown.", + "Bright colours and rainbows cloud your vision.", + "Your funny bone aches.", + "What was that?!", + "You can hear bike horns in the distance.", + "You feel like SHOUTING!", + "Sinister laughter echoes in your ears.", + "Your legs feel like jelly.", + "You feel like telling a pun.") + to_chat(M, "[pick(clown_message)]") + if(jestosterone_component.mind_type == "Mime") + update_flags |= M.adjustToxLoss(1.5 * REAGENTS_EFFECT_MULTIPLIER) + return ..() | update_flags + +/datum/reagent/jestosterone/on_mob_delete(mob/living/M) + ..() + GET_COMPONENT_FROM(remove_fun, /datum/component/jestosterone, M) + GET_COMPONENT_FROM(squeaking, /datum/component/squeak, M) + remove_fun.Destroy() + squeaking.Destroy() /datum/reagent/royal_bee_jelly name = "royal bee jelly" diff --git a/code/modules/reagents/chemistry/recipes/others.dm b/code/modules/reagents/chemistry/recipes/others.dm index 4651ba0f87c..0259ed89e86 100644 --- a/code/modules/reagents/chemistry/recipes/others.dm +++ b/code/modules/reagents/chemistry/recipes/others.dm @@ -290,6 +290,18 @@ result_amount = 2 mix_message = "The substance gives off a lovely scent!" +/datum/chemical_reaction/jestosterone + name = "Jestosterone" + id = "jestosterone" + result = "jestosterone" + required_reagents = list("blood" = 1, "sodiumchloride" = 1, "banana" = 1, "lube" = 1, "space_drugs" = 1) //Or one freshly-squeezed clown + min_temp = 374 + result_amount = 5 + mix_message = "The substance quickly shifts colour, cycling from red, to yellow, to green, to blue, and finally settles at a vibrant fuchsia." + +/datum/chemical_reaction/jestosterone/on_reaction(datum/reagents/holder, created_volume) + playsound(get_turf(holder.my_atom), 'sound/items/bikehorn.ogg', 50, 1) + /datum/chemical_reaction/royal_bee_jelly name = "royal bee jelly" id = "royal_bee_jelly" diff --git a/code/modules/reagents/reagent_containers/patch.dm b/code/modules/reagents/reagent_containers/patch.dm index b9faa296987..486111821f1 100644 --- a/code/modules/reagents/reagent_containers/patch.dm +++ b/code/modules/reagents/reagent_containers/patch.dm @@ -37,4 +37,10 @@ /obj/item/reagent_containers/food/pill/patch/nicotine name = "nicotine patch" desc = "Helps temporarily curb the cravings of nicotine dependency." - list_reagents = list("nicotine" = 20) \ No newline at end of file + list_reagents = list("nicotine" = 20) + +/obj/item/reagent_containers/food/pill/patch/jestosterone + name = "jestosterone patch" + desc = "Helps with brute injuries if the affected person is a clown, otherwise inflicts various annoying effects." + icon_state = "bandaid_clown" + list_reagents = list("jestosterone" = 30) diff --git a/icons/obj/chemical.dmi b/icons/obj/chemical.dmi index f12159de67d..f692814d18c 100644 Binary files a/icons/obj/chemical.dmi and b/icons/obj/chemical.dmi differ diff --git a/paradise.dme b/paradise.dme index 9e36bf7b5af..8a403c97472 100644 --- a/paradise.dme +++ b/paradise.dme @@ -265,6 +265,7 @@ #include "code\datums\cache\powermonitor.dm" #include "code\datums\components\_component.dm" #include "code\datums\components\ducttape.dm" +#include "code\datums\components\jestosterone.dm" #include "code\datums\components\material_container.dm" #include "code\datums\components\squeak.dm" #include "code\datums\diseases\_disease.dm"