Skip to content

Commit

Permalink
Merge branch 'master' into syndie-tools-tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCastmer authored Aug 18, 2024
2 parents dc1d08d + 13441e8 commit 6d05a84
Show file tree
Hide file tree
Showing 12 changed files with 378 additions and 8 deletions.
14 changes: 8 additions & 6 deletions code/game/data_huds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,14 @@ Security HUDs! Basic mode shows only the job.
holder.icon_state = "hud_imp_chem"
set_hud_image_active(IMPCHEM_HUD)

if(HAS_TRAIT(src, TRAIT_MINDSHIELD))
holder = hud_list[IMPLOYAL_HUD]
var/icon/IC = icon(icon, icon_state, dir)
holder.pixel_y = IC.Height() - world.icon_size
holder.icon_state = "hud_imp_loyal"
set_hud_image_active(IMPLOYAL_HUD)
//Dripstation edited
if(istype(I, /obj/item/implant/mindshield))
var/obj/item/implant/mindshield/MS = I
holder = hud_list[IMPLOYAL_HUD]
var/icon/IC = icon(icon, icon_state, dir)
holder.pixel_y = IC.Height() - world.icon_size
holder.icon_state = MS.implant_visible_as
set_hud_image_active(IMPLOYAL_HUD)

/mob/living/carbon/human/proc/sec_hud_set_security_status()
var/image/holder = hud_list[WANTED_HUD]
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/items/implants/implant_mindshield.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
return dat


/* Dripstation start
/obj/item/implant/mindshield/implant(mob/living/target, mob/user, silent = FALSE, force = FALSE)
if(..())
if(!target.mind)
Expand Down Expand Up @@ -85,6 +86,7 @@
ADD_TRAIT(target, TRAIT_MINDSHIELD, "implant")
target.sec_hud_set_implants()
return TRUE
*/ //Dripstation end

/obj/item/implant/mindshield/removed(mob/target, silent = FALSE, special = 0)
if(..())
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/obj/item/implant/biosig_ntcommand
name = "nanotrasen command biosignaller implant"
desc = "An alarm which monitors host vital signs and transmits a radio message upon death. Usually implanted into command staff."
actions_types = null
verb_say = "broadcasts"
verb_exclaim = "broadcasts"
var/obj/item/radio/radio
var/static/list/stealth_areas = typecacheof(list(/area/yogs/infiltrator_base, /area/centcom/syndicate_mothership, /area/shuttle/yogs/stealthcruiser, /area/ruin/syndicate_icemoon, /area/ruin/powered/syndicate_lava_base, /area/ruin/space/has_grav/listeningstation, /area/ruin/space/has_grav/syndiederelict))

obj/item/encryptionkey/biosig_ntcommand
name = "\improper biosignaller radio encryption key"
icon_state = "cent_cypherkey"
independent = TRUE
channels = list(RADIO_CHANNEL_COMMON = 1, RADIO_CHANNEL_CENTCOM = 1)

/obj/item/implant/biosig_ntcommand/Initialize(mapload)
. = ..()
radio = new(src)
radio.keyslot = new/obj/item/encryptionkey/biosig_ntcommand// Should broadcast both on the secure centcom and common channels to notify both all station and central command dudes.
radio.listening = FALSE
radio.recalculateChannels()

/obj/item/implant/biosig_ntcommand/activate(cause)
if(!imp_in)
return FALSE

// Location.
var/area/turf = get_area(imp_in)
// Name of implant user.
var/mobname = imp_in.name
// What is to be said.
var/message = "[station_name()] COMMAND TEAM ALERT: [mobname]'s lifesig//N&#@$¤#§>..." // Default message for unexpected causes.

switch(cause)
if("death")
if(!is_type_in_typecache(turf, stealth_areas)) //give the syndies a bit of stealth
message = "[station_name()] COMMAND TEAM ALERT: [mobname]'s lifesigns ceased in [turf.name]!"
if("emp")
if(prob(70)) //30% chance to give give gib message
var/empname = prob(50) ? turf.name : pick(GLOB.teleportlocs)
message = "[station_name()] COMMAND TEAM ALERT: [mobname]'s lifesigns ceased in [empname]!" //eh, sorry, implant fried themselves.


name = "[mobname]'s Biosignaller"
radio.talk_into(src, message, RADIO_CHANNEL_CENTCOM)
radio.talk_into(src, message, RADIO_CHANNEL_COMMON)
qdel(src)

/obj/item/implant/biosig_ntcommand/emp_act(severity)
activate("emp")

/obj/item/implant/biosig_ntcommand/on_mob_death(mob/living/L, gibbed)
if(gibbed)
activate("gibbed") // Will use default message.
else
activate("death")

/obj/item/implant/biosig_ntcommand/get_data()
. = {"<b>Implant Specifications:</b><BR>
<b>Name:</b>Nanotrasen \"Profit Margin\" Class Employee Biosignaller Implant<BR>
<b>Life:</b>Until activation<BR>
<b>Important Notes:</b>Broadcasts a message over an encrypted channel.<BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b>Contains a miniature radio connected to a bioscanner. Broadcasts the death and last known position of the user both over an encrypted radio channel and all stationary.<BR>"
<b>Integrity:</b> Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}

/obj/item/implanter/biosig_ntcommand
name = "implanter"
imp_type = /obj/item/implant/biosig_ntcommand

/obj/item/implantcase/biosig_ntcommand
name = "implant case - 'Standart Biosignal NT'"
imp_type = /obj/item/implant/biosig_ntcommand
242 changes: 242 additions & 0 deletions modular_dripstation/code/game/objects/items/implants/mindshield.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
/////Nanotrasen variants/////
/////Security and export variant/////
/obj/item/implant/mindshield
var/implant_visible_as = "hud_imp_loyal"
var/active = TRUE

/obj/item/implant/mindshield/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Nanotrasen Employee Management Implant<BR>
<b>Life:</b> One year.<BR>
<b>Important Notes:</b> Personnel injected with this device are much more resistant to brainwashing.<BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Contains a small pod of nanobots that protects the host's mental functions from manipulation.<BR>
<b>Integrity:</b> Implant will last so long as the nanobots are inside the bloodstream."}
return dat


/obj/item/implant/mindshield/implant(mob/living/target, mob/user, silent = FALSE, force = FALSE)
if(..())
if(target.mind && !silent)
to_chat(target, span_notice("You feel a sense of peace and security. You are now protected from brainwashing."))
ADD_TRAIT(target, TRAIT_MINDSHIELD, "implant")
target.sec_hud_set_implants()
return TRUE

/obj/item/implanter/mindshield
name = "implanter"

/////High quality variant/////
/obj/item/implant/mindshield/centcom
name = "high quality mindshield implant"
desc = "Protects value assets from brainwashing. Grants access to military grade weaponry."
implant_visible_as = "hud_imp_loyal_ert"

/obj/item/implant/mindshield/centcom/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Nanotrasen Human Resourse Menatal Protector<BR>
<b>Life:</b> Five years.<BR>
<b>Important Notes:</b> Combat and high value personnel injected with this device are much more resistant to brainwashing.<BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Contains a small pod of nanobots that protects the host's mental functions from manipulation.<BR>
<b>Integrity:</b> Implant will last so long as the nanobots are inside the bloodstream."}
return dat

/obj/item/implanter/mindshield/centcom
name = "implanter"
imp_type = /obj/item/implant/mindshield/centcom

/obj/item/implantcase/mindshield/centcom
name = "implant case - 'High Quality Mindshield'"
imp_type = /obj/item/implant/mindshield/centcom

/////Syndicate variants/////
/////Syndicate agent variant/////
/obj/item/implant/mindshield/tot
icon_state = "totmindshield"
actions_types = list(/datum/action/item_action/hands_free/activate)

/obj/item/implant/mindshield/tot/activate()
. = ..()
active = !active
to_chat(imp_in, "You feel a faint click as [name] [active ? "activates" : "deactivates"]")
implant_visible_as = "[active ? "hud_imp_loyal" : null]"
imp_in.sec_hud_set_implants()


/obj/item/implant/mindshield/tot/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Cybersun Brainwash Denial Implant<BR>
<b>Life:</b> Five Days.<BR>
<b>Important Notes:</b> Device reverts previous mental interference. Agents injected with this device are much more resistant to brainwashing on the mission.<BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Contains a small pod of nanobots that protects the host's mental functions from manipulation.<BR>
<b>Special Features:</b> Will revert most forms of brainwashing before brainwash shielding.<BR>
<b>Integrity:</b> Implant will last so long as the nanobots are inside the bloodstream."}
return dat

/obj/item/implanter/mindshield/tot
name = "implanter"

/////Syndicate operative variant/////
/obj/item/implant/mindshield/tot_obvious
icon_state = "totmindshield_obv"
actions_types = list(/datum/action/item_action/hands_free/activate)
implant_visible_as = "hud_imp_loyal_totobv"

/obj/item/implant/mindshield/tot_obvious/activate()
. = ..()
active = !active
to_chat(imp_in, "You feel a faint click as [name] [active ? "activates" : "deactivates"]")
implant_visible_as = "[active ? "hud_imp_loyal_totobv" : null]"
imp_in.sec_hud_set_implants()

/obj/item/implant/mindshield/tot_obvious/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Cybersun Brainwash Denial Implant<BR>
<b>Life:</b> One Year.<BR>
<b>Important Notes:</b> Device reverts previous mental interference. Operatives injected with this device are much more resistant to brainwashing on the mission.<BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Contains a small pod of nanobots that protects the host's mental functions from manipulation.<BR>
<b>Special Features:</b> Will revert most forms of brainwashing before brainwash shielding.<BR>
<b>Integrity:</b> Implant will last so long as the nanobots are inside the bloodstream."}
return dat

/obj/item/implanter/tot_obvious
name = "implanter"
imp_type = /obj/item/implant/mindshield/tot_obvious

/obj/item/implantcase/tot_obvious
name = "implant case - 'Syndicate Operative Field Mentalshield'"
desc = "A glass case containing a Amnestic implant."
imp_type = /obj/item/implant/mindshield/tot_obvious

/////Amnestic implant/////
/obj/item/implant/amnestic
name = "Amnestic implant"
desc = "Reverts recent mental interference by providing artificial amnesia."
actions_types = null

/obj/item/implant/amnestic/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Nanotrasen Employee Recovery Implant<BR>
<b>Life:</b> Three minutes.<BR>
<b>Important Notes:</b> Personnel injected with this device will remember their true allighment.<BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Contains a small pod of nanobots that removes recent memory and restores the host's mental functions.<BR>
<b>Special Features:</b> Removes recent memory of the host, providing artificial amnesia.<BR>
<b>Integrity:</b> Implant will last so long as the nanobots are inside the bloodstream."}
return dat

/obj/item/implant/amnestic/implant(mob/living/target, mob/user, silent = FALSE, force = FALSE)
if(..())
if(!target.mind || target.stat == DEAD)
removed(target, TRUE)
return TRUE

for(var/obj/item/implant/I in target.implants)
if(istype(I, /obj/item/implant/mindshield))
target.visible_message(span_warning("[target] seems to resist the implant!"), span_warning("You feel something interfering with your curent mental conditioning! And causes heavy influence on your brain functions!!"))
if(istype(target, /mob/living/carbon/human))
traumatize(target)
removed(target, TRUE)
return FALSE

if(target.mind.has_antag_datum(/datum/antagonist/brainwashed))
target.mind.remove_antag_datum(/datum/antagonist/brainwashed)

var/datum/antagonist/hivemind/host = target.mind.has_antag_datum(/datum/antagonist/hivemind) //Releases the target from mind control beforehand
if(host)
var/datum/mind/M = host.owner
if(M)
var/datum/action/cooldown/spell/aoe/target_hive/hive_control/the_spell = locate(/datum/action/cooldown/spell/aoe/target_hive/hive_control) in M.current.actions
if(the_spell && the_spell.active)
the_spell.release_control() //he basicly forget the targets

if(target.mind.has_antag_datum(/datum/antagonist/rev/head) || target.mind.has_antag_datum(/datum/antagonist/hivemind) || target.mind.unconvertable)
if(!silent)
target.visible_message(span_warning("[target] seems to resist the implant!"), span_warning("You feel something interfering with your curent mental conditioning, but your allighment lasts much more longer and can`t be reverted by this level of braiwashing!"))
removed(target, TRUE)
return FALSE
if(target.mind.has_antag_datum(/datum/antagonist/gang/boss) || target.mind.has_antag_datum(/datum/antagonist/mindslave))
if(!silent)
target.visible_message(span_warning("[target] seems to resist the implant!"), span_warning("You feel something interfering with your curent mental conditioning, but your allighment lasts much more longer and can`t be reverted by this level of braiwashing!"))
removed(target, TRUE)
return FALSE

if(IS_VASSAL(target))
if(IS_FAVORITE_VASSAL(target))
if(!silent)
target.visible_message(span_warning("[target] seems to resist the implant!"), span_warning("You feel something interfering with your curent mental conditioning, but your allighment can`t be reverted by this level of braiwashing!"))
removed(target, TRUE)
return FALSE
target.mind.remove_antag_datum(/datum/antagonist/vassal)

var/datum/antagonist/hivevessel/woke = target.is_wokevessel()
if(is_hivemember(target))
for(var/datum/antagonist/hivemind/hive in GLOB.antagonists)
if(hive.hivemembers.Find(target))
var/mob/living/carbon/C = hive.owner.current.get_real_hivehost()
if(C)
C.apply_status_effect(STATUS_EFFECT_HIVE_TRACKER, target, woke?TRACKER_AWAKENED_TIME:TRACKER_MINDSHIELD_TIME)
target.apply_status_effect(STATUS_EFFECT_HIVE_TRACKER, C, TRACKER_DEFAULT_TIME)
if(C.mind) //If you were using mind control, too bad
C.apply_status_effect(STATUS_EFFECT_HIVE_RADAR)
to_chat(C, span_assimilator("We detect a surge of psionic energy from a far away vessel before they disappear from the hive. Whatever happened, there's a good chance they're after us now."))
to_chat(target, span_assimilator("You hear supernatural wailing echo throughout your mind as you are finally set free. Deep down, you can feel the lingering presence of those who enslaved you... as can they!"))
target.apply_status_effect(STATUS_EFFECT_HIVE_RADAR)
remove_hivemember(target)
removed(target, TRUE)
return TRUE

if(woke)
woke.one_mind.remove_member(target.mind)
target.mind.remove_antag_datum(/datum/antagonist/hivevessel)

var/datum/antagonist/rev/rev = target.mind.has_antag_datum(/datum/antagonist/rev)
if(rev)
rev.remove_revolutionary(FALSE, user)
removed(target, TRUE)
return TRUE
if(target.mind.has_antag_datum(/datum/antagonist/gang))
target.mind.remove_antag_datum(/datum/antagonist/gang)
removed(target, TRUE)
return TRUE
if(!silent)
if(target.mind in SSticker.mode.cult)
to_chat(target, span_warning("You feel something interfering with your mental conditioning, but you FAITH resist it!"))
removed(target, TRUE)
return TRUE

to_chat(target, span_warning("You feel odd. It seems you can`t remember anything about that shift..."))
removed(target, TRUE)
return TRUE

/obj/item/implant/amnestic/proc/traumatize(mob/living/carbon/human/H)
var/resistance = pick(
50;TRAUMA_RESILIENCE_BASIC,
30;TRAUMA_RESILIENCE_SURGERY,
15;TRAUMA_RESILIENCE_LOBOTOMY,
5;TRAUMA_RESILIENCE_MAGIC)

var/trauma_type = pickweight(list(
BRAIN_TRAUMA_MILD = 60,
BRAIN_TRAUMA_SEVERE = 30,
BRAIN_TRAUMA_SPECIAL = 10
))

H.gain_trauma_type(trauma_type, resistance)

/obj/item/implanter/amnestic
name = "implanter"
imp_type = /obj/item/implant/mindshield

/obj/item/implantcase/amnestic
name = "implant case - 'Amnestic'"
desc = "A glass case containing a Amnestic implant."
imp_type = /obj/item/implant/amnestic
18 changes: 18 additions & 0 deletions modular_dripstation/code/game/objects/items/pins.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/obj/item/firing_pin/implant/mindshield
name = "mindshield firing pin"
desc = "This Security firing pin authorizes the weapon for only Nanotrasen Brand mindshield-implanted users."
icon_state = "firing_pin_loyalty"
req_implant = /obj/item/implant/mindshield

/obj/item/firing_pin/implant/mindshield/pin_auth(mob/living/user)
if(user)
for(var/obj/item/implant/I in user.implants)
if(req_implant && (I.type == /obj/item/implant/mindshield || I.type == /obj/item/implant/mindshield/centcom))
return TRUE
return FALSE

/obj/item/firing_pin/implant/centcom_mindshield
name = "mindshield firing pin"
desc = "This Centcom firing pin authorizes the weapon for only high quality mindshield-implanted users."
icon_state = "firing_pin_loyalty"
req_implant = /obj/item/implant/mindshield/centcom
10 changes: 10 additions & 0 deletions modular_dripstation/code/game/objects/items/storage/boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,16 @@
new /obj/item/badge/security/cadet(src)
new /obj/item/badge/security/cadet(src)

/obj/item/storage/box/security/biosig_nt
name = "biosignaller implant box"
desc = "A box claiming to contain 'Nanotrasen \"Profit Margin\" Class Employee Biosignaller' implants."
illustration = "implant"

/obj/item/storage/box/security/biosig_nt/PopulateContents()
for(var/i in 1 to 6)
new /obj/item/implantcase/biosig_ntcommand(src)
new /obj/item/implanter/biosig_ntcommand(src)

// Syndie kit
/obj/item/storage/box/donkdrip
illustration = null
Expand Down
Loading

0 comments on commit 6d05a84

Please sign in to comment.