mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-11 01:51:51 +00:00
* Add raw tg emote datums * Some more initial implementation * First (big) commit * More reworks, most emotes seem to work but cooldowns are weird * Add the remaining emote species * Add simple mobs * Update defines, add more comments * Remove unnecessary intentional calls * Fix some bugs, add more functionality - Silicon mobs/bots can't use all the living emotes - Sound volume can now be specified for emotes - Added a define for emotes to not go thru runechat - Reorganized some emotes - Some human emotes that need breath will gasp - IPCs can beep boop - Restore power warn for robits - Sneezing and coughing have sound effects * Fixes emote species separation not working in *help * Reorganize emotes based on what's available on paradise * mouthful mode * Update implants to use emote signals * Update species whitelist to use a typecache * Cleanups * More small changes - Remove old extraneous typecache - Reconfigure drask emotes - Make all mime emotes visible (since they're silent) * Remove old emote functions * Update emote sounds, volume * Rework more emotes into EMOTE_VISIBLE * *rumble* * More slight testing and cleanup - Drop audio emote cooldown from 10 to 5 seconds - Change clapping behaivor slightly, putting it into run_emote - Update some emote flags here and there - Fix up johnny, though remind me why this one exists? * Fix indentation, missing typecast * fix some returns * More review * Rename emote files * Add'l review * Even more emote fixes! - Move defines out into an emote define file - Integrate audio and general emote cooldowns - change some 1 and 2 into visible/audible - Try to fix monkey screech * Add ability for admins to mute users' emotes. * Rename cooldowns, add general mob emote cooldown. * Fix flip not always geting the right message * Add some emote target handling, docs * Fix admin rights, indentation * Update emote.dm set default mode to ANY * General implant fixes - The way implant triggers are handled is now improved, with separate checks for death and emotes instead of just checking deathgasp. - Implants can choose to be triggered for the first death or for every death. - Voice of God play dead now activates sad trombone read: voice of god can now no longer lowtiergod nukies * Bunch of other changes and bugfixes - Adds number flag for behavior - Reworks how muzzling/vocalizing emotes works - Breaks out sound effects - Drops cooldown to 1.5s * Fix people being able to snore/nightmare while awake. * Bump paralysis on living emotes * First review pass * Clean up implants (while we're here) and fix compile errors * in living error * More outstanding review fixes * use more isx() checks * Add pre-emote signal, try_run_emote() * Prevent silicons from playing their deathgasp multiple times * Add emote postfix behavior for adding parameters to non-message params. Also adds a signal to intercept emote actions. * Fix linter complaints * Remove new player checks on GLOB.dead_mob_list * Fix species emotes not being distinguished, remove weird legacy code * monkey ball * better docs == better code * Fix audio cooldown, silicon emotes * Fix ghost emotes (don't worry they're staying) * Restore spin to 2 seconds * oh johnny boy * Make fainting last two seconds instead of .2 seconds * Remove extra highfive message * Tick friendly emotes * Fix up friendly emotes, ghost emotes * Add some emote message safeguards, prevent flip from showing twice * Fix ghost vision message format * Fix hands_use_check on non-carbon mobs * Bring emotes in line with say re. oxyloss * Add option for death implants to not trigger on gib * Try adding some unit testing * Include emote unit tests * More attempts at unit testing * More attempts at unit testing? * forget it this is fine * Housekeeping * Little bit more * Remove extra bolding from ghostsight emotes * More sanity checks, fix snore * Remove stack trace when unintentional emote fails * Update code/modules/mob/living/silicon/silicon_emote.dm oops Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> * More implant cleanups * Oh I missed this * Silence wagging, more review fixes * Oops 2 * ensure everything can swear * High-five fixes and status effect stuff - Adds new on_timeout() function that gets triggered when a status effect expires - Fixes up passing arguments to status effects - Ensures high-five explosions don't kill the wizards * More review stuff - Add a stat to text to make things easier - Make it harder to delete emotes - BIG DANGER - pose can no longer be set while unconscious * Remove extra high five logic, godmode changes * forgor * Fix gasp not working * Update docs for good measure * Some review and custom emote fixes * Fixes death alarms being broken * Better handle stat_allowed, more review comments. * ..() conventions * This is why unit tests are nice * Remove drone snowflake emote stuff * Linting * No more flipping on the ground * Snap doesn't require hands free * Does it make complete sense? no, but it's Fun * Apply suggestions from code review Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> * Fix revenant messages, power warning * epic webedit fail, laugh at this user Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
185 lines
5.8 KiB
Plaintext
185 lines
5.8 KiB
Plaintext
/obj/item/implant/explosive
|
|
name = "microbomb implant"
|
|
desc = "And boom goes the weasel."
|
|
icon_state = "explosive"
|
|
origin_tech = "materials=2;combat=3;biotech=4;syndicate=4"
|
|
actions_types = list(/datum/action/item_action/hands_free/activate/always)
|
|
var/detonating = FALSE
|
|
var/weak = 2
|
|
var/medium = 0.8
|
|
var/heavy = 0.4
|
|
var/delay = 7
|
|
trigger_causes = IMPLANT_TRIGGER_DEATH_ONCE // Not surviving that
|
|
|
|
/obj/item/implant/explosive/get_data()
|
|
var/dat = {"<b>Implant Specifications:</b><BR>
|
|
<b>Name:</b> Robust Corp RX-78 Employee Management Implant<BR>
|
|
<b>Life:</b> Activates upon death.<BR>
|
|
<b>Important Notes:</b> Explodes<BR>
|
|
<HR>
|
|
<b>Implant Details:</b><BR>
|
|
<b>Function:</b> Contains a compact, electrically detonated explosive that detonates upon receiving a specially encoded signal or upon host death.<BR>
|
|
<b>Special Features:</b> Explodes<BR>
|
|
"}
|
|
return dat
|
|
|
|
/obj/item/implant/explosive/death_trigger(mob/source, gibbed)
|
|
activate("death")
|
|
|
|
/obj/item/implant/explosive/activate(cause)
|
|
if(!cause || !imp_in)
|
|
return FALSE
|
|
if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your microbomb implant? This will cause you to explode!", "Microbomb Implant Confirmation", "Yes", "No") != "Yes")
|
|
return FALSE
|
|
if(detonating)
|
|
return FALSE
|
|
heavy = round(heavy)
|
|
medium = round(medium)
|
|
weak = round(weak)
|
|
detonating = TRUE
|
|
to_chat(imp_in, "<span class='danger'>You activate your microbomb implant.</span>")
|
|
//If the delay is short, just blow up already jeez
|
|
if(delay <= 7)
|
|
explosion(src, heavy, medium, weak, weak, flame_range = weak)
|
|
if(imp_in)
|
|
imp_in.gib()
|
|
qdel(src)
|
|
return
|
|
timed_explosion()
|
|
|
|
/obj/item/implant/explosive/implant(mob/source)
|
|
var/obj/item/implant/explosive/imp_e = locate(src.type) in source
|
|
if(imp_e && imp_e != src)
|
|
imp_e.heavy += heavy
|
|
imp_e.medium += medium
|
|
imp_e.weak += weak
|
|
imp_e.delay += delay
|
|
qdel(src)
|
|
return 1
|
|
|
|
return ..()
|
|
|
|
/obj/item/implant/explosive/proc/timed_explosion()
|
|
imp_in.visible_message("<span class = 'warning'>[imp_in] starts beeping ominously!</span>")
|
|
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
|
sleep(delay/4)
|
|
if(imp_in && imp_in.stat)
|
|
imp_in.visible_message("<span class = 'warning'>[imp_in] doubles over in pain!</span>")
|
|
imp_in.Weaken(14 SECONDS)
|
|
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
|
sleep(delay/4)
|
|
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
|
sleep(delay/4)
|
|
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
|
sleep(delay/4)
|
|
explosion(src,heavy,medium,weak,weak, flame_range = weak)
|
|
if(imp_in)
|
|
imp_in.gib()
|
|
qdel(src)
|
|
|
|
/obj/item/implant/explosive/macro
|
|
name = "macrobomb implant"
|
|
desc = "And boom goes the weasel. And everything else nearby."
|
|
icon_state = "explosive"
|
|
origin_tech = "materials=3;combat=5;biotech=4;syndicate=5"
|
|
weak = 16
|
|
medium = 8
|
|
heavy = 4
|
|
delay = 70
|
|
|
|
/obj/item/implant/explosive/macro/activate(cause)
|
|
if(!cause || !imp_in) return 0
|
|
if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your macrobomb implant? This will cause you to explode and gib!", "Macrobomb Implant Confirmation", "Yes", "No") != "Yes")
|
|
return 0
|
|
to_chat(imp_in, "<span class='notice'>You activate your macrobomb implant.</span>")
|
|
timed_explosion()
|
|
|
|
/obj/item/implant/explosive/macro/implant(mob/source)
|
|
var/obj/item/implant/explosive/imp_e = locate(src.type) in source
|
|
if(imp_e && imp_e != src)
|
|
return 0
|
|
imp_e = locate(/obj/item/implant/explosive) in source
|
|
if(imp_e && imp_e != src)
|
|
heavy += imp_e.heavy
|
|
medium += imp_e.medium
|
|
weak += imp_e.weak
|
|
delay += imp_e.delay
|
|
qdel(imp_e)
|
|
|
|
return ..()
|
|
|
|
|
|
/obj/item/implanter/explosive
|
|
name = "implanter (explosive)"
|
|
|
|
/obj/item/implanter/explosive/New()
|
|
imp = new /obj/item/implant/explosive(src)
|
|
..()
|
|
|
|
|
|
/obj/item/implantcase/explosive
|
|
name = "implant case - 'Explosive'"
|
|
desc = "A glass case containing an explosive implant."
|
|
|
|
/obj/item/implantcase/explosive/New()
|
|
imp = new /obj/item/implant/explosive(src)
|
|
..()
|
|
|
|
|
|
/obj/item/implanter/explosive_macro
|
|
name = "implanter (macro-explosive)"
|
|
|
|
/obj/item/implanter/explosive_macro/New()
|
|
imp = new /obj/item/implant/explosive/macro(src)
|
|
..()
|
|
|
|
|
|
// Dust implant, for CC officers. Prevents gear theft if they die.
|
|
|
|
/obj/item/implant/dust
|
|
name = "duster implant"
|
|
desc = "An alarm which monitors host vital signs, transmitting a radio message and dusting the corpse on death."
|
|
icon = 'icons/effects/blood.dmi'
|
|
icon_state = "remains"
|
|
actions_types = list(/datum/action/item_action/hands_free/activate/always)
|
|
trigger_causes = IMPLANT_TRIGGER_DEATH_ONCE | IMPLANT_TRIGGER_NOT_WHEN_GIBBED
|
|
|
|
/obj/item/implant/dust/get_data()
|
|
var/dat = {"<b>Implant Specifications:</b><BR>
|
|
<b>Name:</b> Ultraviolet Corp XX-13 Security Implant<BR>
|
|
<b>Life:</b> Activates upon death.<BR>
|
|
<b>Important Notes:</b> Vaporizes organic matter<BR>
|
|
<HR>
|
|
<b>Implant Details:</b><BR>
|
|
<b>Function:</b> Contains a compact, electrically activated heat source that turns its host to ash upon activation, or their death. <BR>
|
|
<b>Special Features:</b> Vaporizes<BR>
|
|
"}
|
|
return dat
|
|
|
|
/obj/item/implant/dust/death_trigger(emote, mob/source, force)
|
|
activate("death")
|
|
|
|
/obj/item/implant/dust/activate(cause)
|
|
if(!cause || !imp_in || cause == "emp")
|
|
return 0
|
|
if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your dusting implant? This will turn you to ash!", "Dusting Confirmation", "Yes", "No") != "Yes")
|
|
return 0
|
|
to_chat(imp_in, "<span class='notice'>Your dusting implant activates!</span>")
|
|
imp_in.visible_message("<span class = 'warning'>[imp_in] burns up in a flash!</span>")
|
|
for(var/obj/item/I in imp_in.contents)
|
|
if(I == src)
|
|
continue
|
|
if(I.flags & NODROP)
|
|
qdel(I)
|
|
imp_in.dust()
|
|
|
|
/obj/item/implant/dust/emp_act(severity)
|
|
return
|
|
|
|
/obj/item/implanter/dust
|
|
name = "implanter (Dust-on-death)"
|
|
|
|
/obj/item/implanter/dust/New()
|
|
imp = new /obj/item/implant/dust(src)
|
|
..()
|