Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Have You Tried Turning It off and on Again?" | NEW NEGATIVE QUIRK #255

Merged
merged 60 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
3f3764e
Update declarations.dm
K3Licia Nov 27, 2024
a9a9f1d
Update _traits.dm
K3Licia Nov 27, 2024
d701ca6
Update admin_tooling.dm
K3Licia Nov 27, 2024
5e92afe
Update generic.dm
K3Licia Nov 27, 2024
a1c140d
Update MMI.dm
K3Licia Nov 27, 2024
49e0586
Update generic.dm
K3Licia Nov 27, 2024
5035381
Add files via upload
K3Licia Nov 27, 2024
55f9ff1
Rename system_shock_quirk.dm to system_shock.dm
K3Licia Nov 27, 2024
696ac67
Update tgstation.dme
K3Licia Nov 27, 2024
86519b1
Update system_shock.dm
K3Licia Nov 27, 2024
356a799
Update tgstation.dme
K3Licia Nov 27, 2024
c0cd1a5
Update system_shock.dm
K3Licia Nov 27, 2024
e92cda6
Update system_shock.dm
K3Licia Nov 28, 2024
ff37c72
Update system_shock.dm
K3Licia Nov 28, 2024
8745bf8
Revert "Update system_shock.dm"
K3Licia Nov 28, 2024
cdaa01b
Revert "Update system_shock.dm"
K3Licia Nov 28, 2024
2a7c533
Revert "Update system_shock.dm"
K3Licia Nov 28, 2024
993136e
crying my eyes out
K3Licia Nov 28, 2024
7728b6c
Revert "crying my eyes out"
K3Licia Nov 28, 2024
7478a0f
Update system_shock.dm
K3Licia Nov 28, 2024
3478a60
Revert "Update system_shock.dm"
K3Licia Nov 28, 2024
b101fd5
Update system_shock.dm
K3Licia Nov 28, 2024
49c5d0a
trying again...
K3Licia Nov 28, 2024
74cb4c4
Revert "trying again..."
K3Licia Nov 28, 2024
3126d41
Update system_shock.dm
K3Licia Nov 28, 2024
70be7ac
Update system_shock.dm
K3Licia Nov 28, 2024
d37a5fd
Update system_shock.dm
K3Licia Nov 28, 2024
aa83106
Update system_shock.dm
K3Licia Nov 28, 2024
5e79dde
Update system_shock.dm
K3Licia Nov 28, 2024
afef643
Update system_shock.dm
K3Licia Nov 28, 2024
0bd887e
Update code/datums/quirks/negative_quirks/system_shock.dm
K3Licia Nov 29, 2024
2202ce7
Update code/datums/quirks/negative_quirks/system_shock.dm
K3Licia Nov 29, 2024
3d659bc
Update _traits.dm
K3Licia Nov 29, 2024
b5ed9e5
Update admin_tooling.dm
K3Licia Nov 29, 2024
8ba289b
Update system_shock.dm
K3Licia Nov 29, 2024
353ae0c
Update MMI.dm
K3Licia Nov 29, 2024
80db9f2
Update generic.dm
K3Licia Nov 29, 2024
3cde523
Update system_shock.dm
K3Licia Nov 29, 2024
bc88256
Delete code/datums/quirks/negative_quirks/system_shock.dm
K3Licia Nov 29, 2024
38d52b6
Add files via upload
K3Licia Nov 29, 2024
62c51cf
Update declarations.dm
K3Licia Nov 29, 2024
3d4c5a9
Update system_shock.dm
K3Licia Nov 29, 2024
eb2b4df
Update tgstation.dme
K3Licia Nov 29, 2024
7e4b2a7
Update tgstation.dme
K3Licia Nov 29, 2024
99003b8
Update tgstation.dme
K3Licia Nov 29, 2024
128ff7f
Revert "Update declarations.dm"
K3Licia Nov 29, 2024
422a3c6
Merge branch 'system-shock' of https://github.com/K3Licia/DopplerShif…
K3Licia Nov 29, 2024
98b7e8a
Update system_shock.dm
K3Licia Nov 29, 2024
5d6fb38
Add files via upload
K3Licia Nov 29, 2024
2d1aef6
Update declarations.dm
K3Licia Nov 29, 2024
d58fa15
Update declarations.dm
K3Licia Nov 29, 2024
ae05022
Update declarations.dm
K3Licia Nov 29, 2024
d07248a
Update generic.dm
K3Licia Nov 29, 2024
abd0538
Update MMI.dm
K3Licia Nov 29, 2024
afeb6cd
Merge branch 'DopplerShift13:master' into system-shock
K3Licia Nov 29, 2024
a6f1111
Update tgstation.dme
K3Licia Nov 29, 2024
9cab49e
Merge branch 'DopplerShift13:master' into system-shock
K3Licia Nov 29, 2024
f9ac81d
Update tgstation.dme
K3Licia Nov 29, 2024
1c1bb8d
Delete code/__DEFINES/~doppler_defines/traits/declarations.dm
K3Licia Nov 29, 2024
9788dd2
Revert "Delete code/__DEFINES/~doppler_defines/traits/declarations.dm"
K3Licia Nov 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions code/__DEFINES/~doppler_defines/traits/declarations.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/// The trait that determines if someone has the system shock quirk.
#define TRAIT_SYSTEM_SHOCK "trait_system_shock"

1 change: 1 addition & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_IGNORE_FIRE_PROTECTION" = TRAIT_IGNORE_FIRE_PROTECTION,
"TRAIT_LEFT_EYE_SCAR" = TRAIT_LEFT_EYE_SCAR,
"TRAIT_RIGHT_EYE_SCAR" = TRAIT_RIGHT_EYE_SCAR,
"TRAIT_SYSTEM_SHOCK" = TRAIT_SYSTEM_SHOCK, // DOPPLER EDIT ADDITION
),
/obj/item = list(
"TRAIT_APC_SHOCKING" = TRAIT_APC_SHOCKING,
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/admin_tooling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ GLOBAL_LIST_INIT(admin_visible_traits, list(
"TRAIT_IGNORE_FIRE_PROTECTION" = TRAIT_IGNORE_FIRE_PROTECTION,
"TRAIT_LEFT_EYE_SCAR" = TRAIT_LEFT_EYE_SCAR,
"TRAIT_RIGHT_EYE_SCAR" = TRAIT_RIGHT_EYE_SCAR,
"TRAIT_SYSTEM_SHOCK" = TRAIT_SYSTEM_SHOCK, // DOPPLER EDIT ADDITION
),
/obj/item = list(
"TRAIT_APC_SHOCKING" = TRAIT_APC_SHOCKING,
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/items/robot/items/generic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
span_userdanger("[user] prods you with [src]!"),
)

SEND_SIGNAL(attacked_mob, COMSIG_LIVING_MINOR_SHOCK) // DOPPLER EDIT ADDITION
playsound(loc, 'sound/items/weapons/egloves.ogg', 50, TRUE, -1)
cooldown_check = world.time + cooldown
log_combat(user, attacked_mob, "stunned", src, "(Combat mode: [user.combat_mode ? "On" : "Off"])")
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/brain/MMI.dm
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@
if(3)
brainmob.emp_damage = min(brainmob.emp_damage + rand(0,10), 30)
brainmob.emote("alarm")
SEND_SIGNAL(brainmob, COMSIG_LIVING_MINOR_SHOCK) // DOPPLER EDIT ADDITION

/obj/item/mmi/atom_deconstruct(disassembled = TRUE)
if(brain)
Expand Down
31 changes: 31 additions & 0 deletions modular_doppler/modular_quirks/system_shock/system_shock.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/datum/quirk/system_shock
name = "System Shock"
desc = "You and electricity have a volatile relationship. One spark's liable to forcefully reboot your systems. Note: This quirk only works on synths."
gain_text = span_danger("You start feeling nervous around plug sockets.")
lose_text = span_notice("You feel normal about sparks.")
medical_record_text = "Patient's processors are unusually uninsulated."
value = -8
mob_trait = TRAIT_SYSTEM_SHOCK
icon = FA_ICON_PLUG_CIRCLE_XMARK
quirk_flags = QUIRK_HUMAN_ONLY

/datum/quirk/system_shock/add(client/client_source)
if(isandroid(quirk_holder))
RegisterSignals(quirk_holder, list(COMSIG_LIVING_ELECTROCUTE_ACT, COMSIG_LIVING_MINOR_SHOCK), PROC_REF(on_electrocute))

/datum/quirk/system_shock/remove()
UnregisterSignal(quirk_holder, list(COMSIG_LIVING_ELECTROCUTE_ACT, COMSIG_LIVING_MINOR_SHOCK))


/datum/quirk/system_shock/proc/on_electrocute()
SIGNAL_HANDLER
var/knockout_length = 20 SECONDS + rand(0 SECONDS, 5 SECONDS)
quirk_holder.set_static_vision(knockout_length)
quirk_holder.balloon_alert(quirk_holder, "system rebooting")
to_chat(quirk_holder, span_danger("CRIT&!AL ERR%R: S#STEM REBO#TING."))
//The intent with the 0.4 seconds is so that the visual static effect lasts longer than the actual knockout/sleeping effect.
addtimer(CALLBACK(src, PROC_REF(knock_out), knockout_length - 0.4 SECONDS), 2 SECONDS)

///The length at which unconsciousness lasts during system shock.
/datum/quirk/system_shock/proc/knock_out(length)
quirk_holder.Sleeping(length)
2 changes: 2 additions & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@
#include "code\__DEFINES\~doppler_defines\traits.dm"
#include "code\__DEFINES\~doppler_defines\vv.dm"
#include "code\__DEFINES\~doppler_defines\wounds.dm"
#include "code\__DEFINES\~doppler_defines\traits\declarations.dm"
#include "code\__HELPERS\_auxtools_api.dm"
#include "code\__HELPERS\_dreamluau.dm"
#include "code\__HELPERS\_lists.dm"
Expand Down Expand Up @@ -7054,6 +7055,7 @@
#include "modular_doppler\modular_quirks\paycheck_rations\code\tickets.dm"
#include "modular_doppler\modular_quirks\permitted_cybernetic\permitted_cybernetic.dm"
#include "modular_doppler\modular_quirks\permitted_cybernetic\code\preferences.dm"
#include "modular_doppler\modular_quirks\system_shock\system_shock.dm"
#include "modular_doppler\modular_sounds\code\sounds.dm"
#include "modular_doppler\modular_species\_species.dm"
#include "modular_doppler\modular_species\code\bloodsplatter.dm"
Expand Down
Loading