This commit is contained in:
Ghommie
2019-10-30 14:46:42 +01:00
2045 changed files with 85542 additions and 70698 deletions
+3 -3
View File
@@ -72,7 +72,7 @@
else
return FALSE
forceMove(target)
moveToNullspace()
imp_in = target
target.implants += src
if(activated)
@@ -89,12 +89,12 @@
return TRUE
/obj/item/implant/proc/removed(mob/living/source, silent = FALSE, special = 0)
moveToNullspace()
SEND_SIGNAL(src, COMSIG_IMPLANT_REMOVING, args)
imp_in = null
source.implants -= src
for(var/X in actions)
var/datum/action/A = X
A.Grant(source)
A.Remove(source)
if(ishuman(source))
var/mob/living/carbon/human/H = source
H.sec_hud_set_implants()
@@ -3,6 +3,7 @@
desc = "Injects things."
icon_state = "reagents"
activated = FALSE
var/obj/item/imp_chemholder/chemholder
/obj/item/implant/chem/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
@@ -29,6 +30,26 @@
GLOB.tracked_chem_implants -= src
return ..()
/obj/item/implant/chem/implant(mob/living/target, mob/user, silent = FALSE)
. = ..()
if(!.)
return
if(chemholder)
chemholder.forceMove(target)
return
chemholder = new(imp_in, src)
reagents.trans_to(chemholder, reagents.total_volume)
/obj/item/implant/chem/removed(mob/target, silent = FALSE, special = 0)
. = ..()
if(!.)
return
if(!special)
chemholder.reagents.trans_to(src, chemholder.reagents.total_volume)
QDEL_NULL(chemholder)
else
chemholder?.moveToNullspace()
/obj/item/implant/chem/trigger(emote, mob/living/source)
if(emote == "deathgasp")
if(istype(source) && !(source.stat == DEAD))
@@ -45,13 +66,12 @@
injectamount = reagents.total_volume
else
injectamount = cause
reagents.trans_to(R, injectamount)
chemholder.reagents.trans_to(R, injectamount)
to_chat(R, "<span class='italics'>You hear a faint beep.</span>")
if(!reagents.total_volume)
if(!chemholder.reagents.total_volume)
to_chat(R, "<span class='italics'>You hear a faint click from your chest.</span>")
qdel(src)
/obj/item/implantcase/chem
name = "implant case - 'Remote Chemical'"
desc = "A glass case containing a remote chemical implant."
@@ -63,3 +83,17 @@
return TRUE
else
return ..()
/obj/item/imp_chemholder
var/obj/item/implant/chem/implant
/obj/item/imp_chemholder/Initialize(mapload, obj/item/implant/chem/_implant)
. = ..()
create_reagents(50)
implant = _implant
/obj/item/imp_chemholder/Destroy()
if(implant?.imp_in)
qdel(implant)
else
return ..()
@@ -11,7 +11,7 @@
/obj/item/implant/sad_trombone/trigger(emote, mob/source)
if(emote == "deathgasp")
playsound(loc, 'sound/misc/sadtrombone.ogg', 50, 0)
playsound(source.loc, 'sound/misc/sadtrombone.ogg', 50, 0)
/obj/item/implanter/sad_trombone
name = "implanter (sad trombone)"
@@ -11,8 +11,9 @@
var/popup = FALSE // is the DOUWANNABLOWUP window open?
var/active = FALSE
/obj/item/implant/explosive/on_mob_death(mob/living/L, gibbed)
activate("death")
/obj/item/implant/explosive/trigger(emote, mob/source)
if(emote == "deathgasp")
activate("death")
/obj/item/implant/explosive/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
@@ -29,32 +30,18 @@
/obj/item/implant/explosive/activate(cause)
. = ..()
if(!cause || !imp_in || active)
return 0
return FALSE
if(cause == "action_button" && !popup)
popup = TRUE
var/response = alert(imp_in, "Are you sure you want to activate your [name]? This will cause you to explode!", "[name] Confirmation", "Yes", "No")
popup = FALSE
if(response == "No")
return 0
heavy = round(heavy)
medium = round(medium)
weak = round(weak)
to_chat(imp_in, "<span class='notice'>You activate your [name].</span>")
active = TRUE
var/turf/boomturf = get_turf(imp_in)
message_admins("[ADMIN_LOOKUPFLW(imp_in)] has activated their [name] at [ADMIN_VERBOSEJMP(boomturf)], with cause of [cause].")
//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(1)
qdel(src)
return
timed_explosion()
return FALSE
addtimer(CALLBACK(src, .proc/timed_explosion, cause), 1)
/obj/item/implant/explosive/implant(mob/living/target)
for(var/X in target.implants)
if(istype(X, type))
if(istype(X, /obj/item/implant/explosive))
var/obj/item/implant/explosive/imp_e = X
imp_e.heavy += heavy
imp_e.medium += medium
@@ -65,22 +52,37 @@
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*0.25)
if(imp_in && !imp_in.stat)
/obj/item/implant/explosive/proc/timed_explosion(cause)
if(cause == "death" && imp_in.stat != DEAD)
return FALSE
heavy = round(heavy)
medium = round(medium)
weak = round(weak)
to_chat(imp_in, "<span class='notice'>You activate your [name].</span>")
active = TRUE
var/turf/boomturf = get_turf(imp_in)
message_admins("[ADMIN_LOOKUPFLW(imp_in)] has activated their [name] at [ADMIN_VERBOSEJMP(boomturf)], with cause of [cause].")
if(delay > 7)
imp_in?.visible_message("<span class='warning'>[imp_in] starts beeping ominously!</span>")
playsound(get_turf(imp_in ? imp_in : src), 'sound/items/timer.ogg', 30, 0)
addtimer(CALLBACK(src, .proc/double_pain, TRUE), delay * 0.25)
addtimer(CALLBACK(src, .proc/double_pain), delay * 0.5)
addtimer(CALLBACK(src, .proc/double_pain), delay * 0.75)
addtimer(CALLBACK(src, .proc/boom_goes_the_weasel), delay)
else //If the delay is short, just blow up already jeez
boom_goes_the_weasel()
/obj/item/implant/explosive/proc/double_pain(message = FALSE)
playsound(get_turf(imp_in ? imp_in : src), 'sound/items/timer.ogg', 30, 0)
if(!imp_in)
return
if(message && imp_in.stat == CONSCIOUS)
imp_in.visible_message("<span class='warning'>[imp_in] doubles over in pain!</span>")
imp_in.Knockdown(140)
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay*0.25)
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay*0.25)
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay*0.25)
explosion(src,heavy,medium,weak,weak, flame_range = weak)
if(imp_in)
imp_in.gib(1)
imp_in.Knockdown(140)
/obj/item/implant/explosive/proc/boom_goes_the_weasel()
explosion(get_turf(imp_in ? imp_in : src), heavy, medium, weak, weak, flame_range = weak)
imp_in?.gib(TRUE)
qdel(src)
/obj/item/implant/explosive/macro
@@ -95,17 +97,7 @@
/obj/item/implant/explosive/macro/implant(mob/living/target)
for(var/X in target.implants)
if(istype(X, type))
return 0
for(var/Y in target.implants)
if(istype(Y, /obj/item/implant/explosive))
var/obj/item/implant/explosive/imp_e = Y
heavy += imp_e.heavy
medium += imp_e.medium
weak += imp_e.weak
delay += imp_e.delay
qdel(imp_e)
break
return FALSE
return ..()
@@ -1,7 +1,6 @@
/obj/item/implant/mindshield
name = "mindshield implant"
desc = "Protects against brainwashing."
resistance_flags = INDESTRUCTIBLE
activated = 0
/obj/item/implant/mindshield/get_data()
@@ -69,62 +69,4 @@
healthstring = "<small>Oxygen Deprivation Damage => [round(L.getOxyLoss())]<br />Fire Damage => [round(L.getFireLoss())]<br />Toxin Damage => [round(L.getToxLoss())]<br />Brute Force Damage => [round(L.getBruteLoss())]</small>"
if (!healthstring)
healthstring = "ERROR"
return healthstring
/obj/item/implant/radio
name = "internal radio implant"
activated = TRUE
var/obj/item/radio/radio
var/radio_key
var/subspace_transmission = FALSE
icon = 'icons/obj/radio.dmi'
icon_state = "walkietalkie"
/obj/item/implant/radio/activate()
. = ..()
// needs to be GLOB.deep_inventory_state otherwise it won't open
radio.ui_interact(usr, "main", null, FALSE, null, GLOB.deep_inventory_state)
/obj/item/implant/radio/Initialize(mapload)
. = ..()
radio = new(src)
// almost like an internal headset, but without the
// "must be in ears to hear" restriction.
radio.name = "internal radio"
radio.subspace_transmission = subspace_transmission
radio.canhear_range = 0
if(radio_key)
radio.keyslot = new radio_key
radio.recalculateChannels()
/obj/item/implant/radio/mining
radio_key = /obj/item/encryptionkey/headset_cargo
/obj/item/implant/radio/syndicate
desc = "Are you there God? It's me, Syndicate Comms Agent."
radio_key = /obj/item/encryptionkey/syndicate
subspace_transmission = TRUE
/obj/item/implant/radio/slime
name = "slime radio"
icon = 'icons/obj/surgery.dmi'
icon_state = "adamantine_resonator"
radio_key = /obj/item/encryptionkey/headset_sci
subspace_transmission = TRUE
/obj/item/implant/radio/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Internal Radio Implant<BR>
<b>Life:</b> 24 hours<BR>
<b>Implant Details:</b> Allows user to use an internal radio, useful if user expects equipment loss, or cannot equip conventional radios."}
return dat
/obj/item/implanter/radio
name = "implanter (internal radio)"
imp_type = /obj/item/implant/radio
/obj/item/implanter/radio/syndicate
name = "implanter (internal syndicate radio)"
imp_type = /obj/item/implant/radio/syndicate
return healthstring
@@ -0,0 +1,69 @@
/obj/item/implant/radio
name = "internal radio implant"
activated = TRUE
var/obj/item/radio/internal/radio
var/radio_key
var/subspace_transmission = FALSE
icon = 'icons/obj/radio.dmi'
icon_state = "walkietalkie"
/obj/item/implant/radio/activate()
. = ..()
// needs to be GLOB.deep_inventory_state otherwise it won't open
radio.ui_interact(usr, "main", null, FALSE, null, GLOB.deep_inventory_state)
/obj/item/implant/radio/implant(mob/living/target, mob/user, silent = FALSE)
. = ..()
if(!.)
return
if(radio)
radio.forceMove(target)
return
radio = new(target)
// almost like an internal headset, but without the
// "must be in ears to hear" restriction.
radio.name = "internal radio"
radio.subspace_transmission = subspace_transmission
radio.canhear_range = 0
if(radio_key)
radio.keyslot = new radio_key
radio.recalculateChannels()
/obj/item/implant/radio/removed(mob/target, silent = FALSE, special = 0)
. = ..()
if(!.)
return
if(!special)
qdel(radio)
else
radio?.moveToNullspace()
/obj/item/implant/radio/mining
radio_key = /obj/item/encryptionkey/headset_cargo
/obj/item/implant/radio/syndicate
desc = "Are you there God? It's me, Syndicate Comms Agent."
radio_key = /obj/item/encryptionkey/syndicate
subspace_transmission = TRUE
/obj/item/implant/radio/slime
name = "slime radio"
icon = 'icons/obj/surgery.dmi'
icon_state = "adamantine_resonator"
radio_key = /obj/item/encryptionkey/headset_sci
subspace_transmission = TRUE
/obj/item/implant/radio/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Internal Radio Implant<BR>
<b>Life:</b> 24 hours<BR>
<b>Implant Details:</b> Allows user to use an internal radio, useful if user expects equipment loss, or cannot equip conventional radios."}
return dat
/obj/item/implanter/radio
name = "implanter (internal radio)"
imp_type = /obj/item/implant/radio
/obj/item/implanter/radio/syndicate
name = "implanter (internal syndicate radio)"
imp_type = /obj/item/implant/radio/syndicate
@@ -4,30 +4,44 @@
icon_state = "storage"
item_color = "r"
var/max_slot_stacking = 4
var/obj/item/storage/bluespace_pocket/pocket
/obj/item/implant/storage/activate()
. = ..()
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SHOW, imp_in, TRUE)
SEND_SIGNAL(pocket, COMSIG_TRY_STORAGE_SHOW, imp_in, TRUE)
/obj/item/implant/storage/removed(source, silent = FALSE, special = 0)
. = ..()
if(.)
if(!special)
qdel(GetComponent(/datum/component/storage/concrete/implant))
if(!special)
qdel(pocket)
else
pocket?.moveToNullspace()
return ..()
/obj/item/implant/storage/implant(mob/living/target, mob/user, silent = FALSE)
for(var/X in target.implants)
if(istype(X, type))
var/obj/item/implant/storage/imp_e = X
GET_COMPONENT_FROM(STR, /datum/component/storage, imp_e)
var/datum/component/storage/STR = imp_e.pocket.GetComponent(/datum/component/storage)
if(!STR || (STR && STR.max_items < max_slot_stacking))
imp_e.AddComponent(/datum/component/storage/concrete/implant)
imp_e.pocket.AddComponent(/datum/component/storage/concrete/implant)
qdel(src)
return TRUE
return FALSE
AddComponent(/datum/component/storage/concrete/implant)
. = ..()
if(.)
if(pocket)
pocket.forceMove(target)
else
pocket = new(target)
return ..()
/obj/item/storage/bluespace_pocket
name = "internal bluespace pocket"
icon_state = "pillbox"
w_class = WEIGHT_CLASS_TINY
desc = "A tiny yet spacious pocket, usually found implanted inside sneaky syndicate agents and nowhere else."
component_type = /datum/component/storage/concrete/implant
resistance_flags = INDESTRUCTIBLE //A bomb!
item_flags = DROPDEL
/obj/item/implanter/storage
name = "implanter (storage)"
@@ -15,8 +15,8 @@
. = ..()
QDEL_IN(src, lifespan)
/obj/item/implant/tracking/New()
..()
/obj/item/implant/tracking/Initialize()
. = ..()
GLOB.tracked_implants += src
/obj/item/implant/tracking/Destroy()
@@ -27,7 +27,31 @@
imp_type = /obj/item/implant/tracking
/obj/item/implanter/tracking/gps
imp_type = /obj/item/gps/mining/internal
imp_type = /obj/item/implant/gps
/obj/item/implant/gps
name = "\improper GPS implant"
desc = "Track with this and a GPS."
activated = FALSE
var/obj/item/gps/internal/mining/real_gps
/obj/item/implant/gps/implant(mob/living/target, mob/user, silent = FALSE)
. = ..()
if(!.)
return
if(real_gps)
real_gps.forceMove(target)
else
real_gps = new(target)
/obj/item/implant/gps/removed(mob/living/source, silent = FALSE, special = 0)
. = ..()
if(!.)
return
if(!special)
qdel(real_gps)
else
real_gps?.moveToNullspace()
/obj/item/implant/tracking/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
@@ -1,23 +1,23 @@
/obj/item/implant/uplink
name = "uplink implant"
desc = "Sneeki breeki."
icon = 'icons/obj/radio.dmi'
icon_state = "radio"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
var/starting_tc = 0
/obj/item/implant/uplink/Initialize(mapload, _owner)
. = ..()
AddComponent(/datum/component/uplink, _owner, TRUE, FALSE, null, starting_tc)
/obj/item/implanter/uplink
name = "implanter (uplink)"
imp_type = /obj/item/implant/uplink
/obj/item/implanter/uplink/precharged
name = "implanter (precharged uplink)"
imp_type = /obj/item/implant/uplink/precharged
/obj/item/implant/uplink/precharged
starting_tc = 10
/obj/item/implant/uplink
name = "uplink implant"
desc = "Sneeki breeki."
icon = 'icons/obj/radio.dmi'
icon_state = "radio"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
var/starting_tc = 0
/obj/item/implant/uplink/Initialize(mapload, _owner)
. = ..()
AddComponent(/datum/component/uplink, _owner, TRUE, FALSE, null, starting_tc, GLOB.not_incapacitated_state)
/obj/item/implanter/uplink
name = "implanter (uplink)"
imp_type = /obj/item/implant/uplink
/obj/item/implanter/uplink/precharged
name = "implanter (precharged uplink)"
imp_type = /obj/item/implant/uplink/precharged
/obj/item/implant/uplink/precharged
starting_tc = 10