mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-11 07:59:08 +01:00
Merge pull request #8401 from Ghommie/Ghommie-cit11
Refactoring Implants' loc n°3
This commit is contained in:
@@ -24,8 +24,9 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
var/unlock_note
|
||||
var/unlock_code
|
||||
var/failsafe_code
|
||||
var/datum/ui_state/checkstate
|
||||
|
||||
/datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, datum/game_mode/_gamemode, starting_tc = 20)
|
||||
/datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, datum/game_mode/_gamemode, starting_tc = 20, datum/ui_state/_checkstate)
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
@@ -57,6 +58,7 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
active = _enabled
|
||||
gamemode = _gamemode
|
||||
telecrystals = starting_tc
|
||||
checkstate = _checkstate
|
||||
if(!lockable)
|
||||
active = TRUE
|
||||
locked = FALSE
|
||||
@@ -115,6 +117,7 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
|
||||
/datum/component/uplink/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.inventory_state)
|
||||
state = checkstate ? checkstate : state
|
||||
active = TRUE
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
@@ -123,6 +126,12 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
ui.set_style("syndicate")
|
||||
ui.open()
|
||||
|
||||
/datum/component/uplink/ui_host(mob/user)
|
||||
if(istype(parent, /obj/item/implant)) //implants are like organs, not really located inside mobs codewise.
|
||||
var/obj/item/implant/I = parent
|
||||
return I.imp_in
|
||||
return ..()
|
||||
|
||||
/datum/component/uplink/ui_data(mob/user)
|
||||
if(!user.mind)
|
||||
return
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
H.update_action_buttons_icon()
|
||||
if(implants)
|
||||
for(var/implant_type in implants)
|
||||
var/obj/item/implant/I = new implant_type(H)
|
||||
var/obj/item/implant/I = new implant_type
|
||||
I.implant(H, null, TRUE)
|
||||
|
||||
H.update_body()
|
||||
|
||||
@@ -155,9 +155,9 @@
|
||||
var/obj/item/U = new uplink_type(H, H.key, tc)
|
||||
H.equip_to_slot_or_del(U, SLOT_IN_BACKPACK)
|
||||
|
||||
var/obj/item/implant/weapons_auth/W = new/obj/item/implant/weapons_auth(H)
|
||||
var/obj/item/implant/weapons_auth/W = new
|
||||
W.implant(H)
|
||||
var/obj/item/implant/explosive/E = new/obj/item/implant/explosive(H)
|
||||
var/obj/item/implant/explosive/E = new
|
||||
E.implant(H)
|
||||
H.faction |= ROLE_SYNDICATE
|
||||
H.update_icons()
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
dat += "<h4>[src.active_record.fields["name"]]</h4>"
|
||||
dat += "Scan ID [src.active_record.fields["id"]] <a href='byond://?src=[REF(src)];clone=[active_record.fields["id"]]'>Clone</a><br>"
|
||||
|
||||
var/obj/item/implant/health/H = locate(src.active_record.fields["imp"])
|
||||
var/obj/item/implant/health/H = locate(active_record.fields["imp"])
|
||||
|
||||
if ((H) && (istype(H)))
|
||||
dat += "<b>Health Implant Data:</b><br />[H.sensehealth()]<br><br />"
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/obj/machinery/computer/prisoner
|
||||
@@ -35,11 +35,11 @@
|
||||
dat += "<HR>Chemical Implants<BR>"
|
||||
var/turf/Tr = null
|
||||
for(var/obj/item/implant/chem/C in GLOB.tracked_chem_implants)
|
||||
Tr = get_turf(C)
|
||||
if((Tr) && (Tr.z != src.z))
|
||||
continue//Out of range
|
||||
if(!C.imp_in)
|
||||
continue
|
||||
Tr = get_turf(C.imp_in)
|
||||
if((Tr) && (Tr.z != src.z))
|
||||
continue//Out of range
|
||||
dat += "ID: [C.imp_in.name] | Remaining Units: [C.reagents.total_volume] <BR>"
|
||||
dat += "| Inject: "
|
||||
dat += "<A href='?src=[REF(src)];inject1=[REF(C)]'>(<font class='bad'>(1)</font>)</A>"
|
||||
@@ -48,9 +48,9 @@
|
||||
dat += "********************************<BR>"
|
||||
dat += "<HR>Tracking Implants<BR>"
|
||||
for(var/obj/item/implant/tracking/T in GLOB.tracked_implants)
|
||||
if(!isliving(T.imp_in))
|
||||
if(!T.imp_in || !isliving(T.imp_in))
|
||||
continue
|
||||
Tr = get_turf(T)
|
||||
Tr = get_turf(T.imp_in)
|
||||
if((Tr) && (Tr.z != src.z))
|
||||
continue//Out of range
|
||||
|
||||
|
||||
@@ -127,11 +127,11 @@
|
||||
if(!I.imp_in || !I.allow_teleport || !isliving(I.imp_in))
|
||||
continue
|
||||
else
|
||||
var/mob/living/M = I.loc
|
||||
var/mob/living/M = I.imp_in
|
||||
if(M.stat == DEAD)
|
||||
if(M.timeofdeath + I.lifespan_postmortem < world.time)
|
||||
continue
|
||||
if(is_eligible(I))
|
||||
if(is_eligible(M))
|
||||
L[avoid_assoc_duplicate_keys(M.real_name, areaindex)] = I
|
||||
|
||||
var/desc = input("Please select a location to lock in.", "Locking Computer") as null|anything in L
|
||||
|
||||
@@ -167,8 +167,19 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
||||
gpstag = "Eerie Signal"
|
||||
desc = "Report to a coder immediately."
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
var/obj/item/implant/gps/implant
|
||||
|
||||
/obj/item/gps/mining/internal
|
||||
/obj/item/gps/internal/Initialize(mapload, obj/item/implant/gps/_implant)
|
||||
. = ..()
|
||||
implant = _implant
|
||||
|
||||
/obj/item/gps/internal/Destroy()
|
||||
if(implant?.imp_in)
|
||||
qdel(implant)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/gps/internal/mining
|
||||
icon_state = "gps-m"
|
||||
gpstag = "MINER"
|
||||
desc = "A positioning system helpful for rescuing trapped or injured miners, keeping one on you at all times while mining might just save your life."
|
||||
|
||||
@@ -413,3 +413,16 @@
|
||||
/obj/item/radio/off // Station bounced radios, their only difference is spawning with the speakers off, this was made to help the lag.
|
||||
listening = 0 // And it's nice to have a subtype too for future features.
|
||||
dog_fashion = /datum/dog_fashion/back
|
||||
|
||||
/obj/item/radio/internal
|
||||
var/obj/item/implant/radio/implant
|
||||
|
||||
/obj/item/radio/internal/Initialize(mapload, obj/item/implant/radio/_implant)
|
||||
. = ..()
|
||||
implant = _implant
|
||||
|
||||
/obj/item/radio/internal/Destroy()
|
||||
if(implant?.imp_in)
|
||||
qdel(implant)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
else
|
||||
return FALSE
|
||||
|
||||
forceMove(target)
|
||||
moveToNullspace()
|
||||
imp_in = target
|
||||
target.implants += src
|
||||
if(activated)
|
||||
@@ -89,7 +89,6 @@
|
||||
return TRUE
|
||||
|
||||
/obj/item/implant/proc/removed(mob/living/source, silent = FALSE, special = 0)
|
||||
moveToNullspace()
|
||||
imp_in = null
|
||||
source.implants -= src
|
||||
for(var/X in actions)
|
||||
|
||||
@@ -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,16 +4,18 @@
|
||||
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)
|
||||
@@ -21,13 +23,25 @@
|
||||
var/obj/item/implant/storage/imp_e = X
|
||||
var/datum/component/storage/STR = imp_e.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
-1
@@ -9,7 +9,7 @@
|
||||
|
||||
/obj/item/implant/uplink/Initialize(mapload, _owner)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/uplink, _owner, TRUE, FALSE, null, starting_tc)
|
||||
AddComponent(/datum/component/uplink, _owner, TRUE, FALSE, null, starting_tc, GLOB.not_incapacitated_state)
|
||||
|
||||
/obj/item/implanter/uplink
|
||||
name = "implanter (uplink)"
|
||||
@@ -237,4 +237,4 @@
|
||||
itemUser.visible_message("<span class='suicide'>The portal snaps closed taking [user]'s head with it!</span>")
|
||||
else
|
||||
itemUser.visible_message("<span class='suicide'>[user] looks even further depressed as they realize they do not have a head...and suddenly dies of shame!</span>")
|
||||
return (BRUTELOSS)
|
||||
return (BRUTELOSS)
|
||||
|
||||
@@ -52,5 +52,5 @@
|
||||
/datum/outfit/abductor/scientist/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
|
||||
..()
|
||||
if(!visualsOnly)
|
||||
var/obj/item/implant/abductor/beamplant = new /obj/item/implant/abductor(H)
|
||||
var/obj/item/implant/abductor/beamplant = new
|
||||
beamplant.implant(H)
|
||||
|
||||
@@ -107,9 +107,9 @@
|
||||
/datum/antagonist/overthrow/proc/equip_overthrow()
|
||||
if(!owner || !owner.current || !ishuman(owner.current)) // only equip existing human overthrow members. This excludes the AI, in particular.
|
||||
return
|
||||
var/obj/item/implant/storage/S = locate(/obj/item/implant/storage) in owner.current
|
||||
var/obj/item/implant/storage/S = locate(/obj/item/implant/storage) in owner.current.implants
|
||||
if(!S)
|
||||
S = new(owner.current)
|
||||
S = new
|
||||
S.implant(owner.current)
|
||||
var/I = pick(possible_useful_items)
|
||||
if(ispath(I)) // in case some admin decides to fuck the list up for fun
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
var/obj/item/implant/exile/Implant = new/obj/item/implant/exile(M)
|
||||
var/obj/item/implant/exile/Implant = new
|
||||
Implant.implant(M)
|
||||
|
||||
/datum/antagonist/wizard/academy/create_objectives()
|
||||
|
||||
@@ -210,8 +210,6 @@
|
||||
if(4)
|
||||
//Destroy Equipment
|
||||
for (var/obj/item/I in user)
|
||||
if (istype(I, /obj/item/implant))
|
||||
continue
|
||||
qdel(I)
|
||||
if(5)
|
||||
//Monkeying
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
if(visualsOnly)
|
||||
return
|
||||
|
||||
var/obj/item/implant/mindshield/L = new/obj/item/implant/mindshield(H)
|
||||
var/obj/item/implant/mindshield/L = new
|
||||
L.implant(H, null, 1)
|
||||
|
||||
var/obj/item/radio/R = H.ears
|
||||
|
||||
@@ -401,7 +401,7 @@
|
||||
R.set_frequency(FREQ_CENTCOM)
|
||||
R.freqlock = TRUE
|
||||
|
||||
var/obj/item/implant/mindshield/L = new/obj/item/implant/mindshield(H)//Here you go Deuryn
|
||||
var/obj/item/implant/mindshield/L = new //Here you go Deuryn
|
||||
L.implant(H, null, 1)
|
||||
|
||||
|
||||
@@ -428,7 +428,7 @@
|
||||
|
||||
/datum/outfit/debug //Debug objs plus hardsuit
|
||||
name = "Debug outfit"
|
||||
uniform = /obj/item/clothing/under/patriotsuit
|
||||
uniform = /obj/item/clothing/under/patriotsuit
|
||||
suit = /obj/item/clothing/suit/space/hardsuit/syndi/elite
|
||||
shoes = /obj/item/clothing/shoes/magboots/advance
|
||||
suit_store = /obj/item/tank/internals/oxygen
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
. = ..()
|
||||
var/obj/item/uplink/U = new /obj/item/uplink/nuclear_restricted(H, H.key, 80)
|
||||
H.equip_to_slot_or_del(U, SLOT_IN_BACKPACK)
|
||||
var/obj/item/implant/weapons_auth/W = new/obj/item/implant/weapons_auth(H)
|
||||
var/obj/item/implant/weapons_auth/W = new
|
||||
W.implant(H)
|
||||
var/obj/item/implant/explosive/E = new/obj/item/implant/explosive(H)
|
||||
var/obj/item/implant/explosive/E = new
|
||||
E.implant(H)
|
||||
H.faction |= ROLE_SYNDICATE
|
||||
H.update_icons()
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
toggle_mode_action.Grant(src)
|
||||
var/datum/action/innate/minedrone/dump_ore/dump_ore_action = new()
|
||||
dump_ore_action.Grant(src)
|
||||
var/obj/item/implant/radio/mining/imp = new(src)
|
||||
var/obj/item/implant/radio/mining/imp = new
|
||||
imp.implant(src)
|
||||
|
||||
access_card = new /obj/item/card/id(src)
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
if(!no_bodyparts)
|
||||
spread_bodyparts(no_brain, no_organs)
|
||||
|
||||
for(var/X in implants)
|
||||
var/obj/item/implant/I = X
|
||||
qdel(I)
|
||||
|
||||
spawn_gibs(no_bodyparts)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -371,8 +371,8 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
return message
|
||||
|
||||
/mob/living/proc/radio(message, message_mode, list/spans, language)
|
||||
var/obj/item/implant/radio/imp = locate() in src
|
||||
if(imp && imp.radio.on)
|
||||
var/obj/item/implant/radio/imp = locate() in implants
|
||||
if(imp?.radio.on)
|
||||
if(message_mode == MODE_HEADSET)
|
||||
imp.radio.talk_into(src, message, , spans, language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
. = ..()
|
||||
var/datum/component/uplink/hidden_uplink = internal_storage.GetComponent(/datum/component/uplink)
|
||||
hidden_uplink.telecrystals = 30
|
||||
var/obj/item/implant/weapons_auth/W = new/obj/item/implant/weapons_auth(src)
|
||||
var/obj/item/implant/weapons_auth/W = new
|
||||
W.implant(src)
|
||||
|
||||
/mob/living/simple_animal/drone/snowflake
|
||||
|
||||
@@ -46,7 +46,8 @@
|
||||
fireball.human_req = 0
|
||||
fireball.player_lock = 0
|
||||
AddSpell(fireball)
|
||||
implants += new /obj/item/implant/exile(src)
|
||||
var/obj/item/implant/exile/I = new
|
||||
I.implant(src, null, TRUE)
|
||||
|
||||
mm = new /obj/effect/proc_holder/spell/targeted/projectile/magic_missile
|
||||
mm.clothes_req = 0
|
||||
|
||||
@@ -704,7 +704,7 @@
|
||||
desc = "A miraculous chemical mix that grants human like intelligence to living beings. It has been modified with Syndicate technology to also grant an internal radio implant to the target and authenticate with identification systems."
|
||||
|
||||
/obj/item/slimepotion/slime/sentience/nuclear/after_success(mob/living/user, mob/living/simple_animal/SM)
|
||||
var/obj/item/implant/radio/syndicate/imp = new(src)
|
||||
var/obj/item/implant/radio/syndicate/imp = new
|
||||
imp.implant(SM, user)
|
||||
|
||||
SM.access_card = new /obj/item/card/id/syndicate(SM)
|
||||
@@ -968,7 +968,7 @@
|
||||
|
||||
to_chat(user, "<span class='notice'>You feed the potion to [M].</span>")
|
||||
to_chat(M, "<span class='notice'>Your mind tingles as you are fed the potion. You can hear radio waves now!</span>")
|
||||
var/obj/item/implant/radio/slime/imp = new(src)
|
||||
var/obj/item/implant/radio/slime/imp = new
|
||||
imp.implant(M, user)
|
||||
qdel(src)
|
||||
|
||||
|
||||
+2
-2
@@ -671,7 +671,6 @@
|
||||
#include "code\game\machinery\computer\medical.dm"
|
||||
#include "code\game\machinery\computer\Operating.dm"
|
||||
#include "code\game\machinery\computer\pod.dm"
|
||||
#include "code\game\machinery\computer\prisoner.dm"
|
||||
#include "code\game\machinery\computer\robot.dm"
|
||||
#include "code\game\machinery\computer\security.dm"
|
||||
#include "code\game\machinery\computer\station_alert.dm"
|
||||
@@ -945,16 +944,17 @@
|
||||
#include "code\game\objects\items\implants\implant_krav_maga.dm"
|
||||
#include "code\game\objects\items\implants\implant_mindshield.dm"
|
||||
#include "code\game\objects\items\implants\implant_misc.dm"
|
||||
#include "code\game\objects\items\implants\implant_radio.dm"
|
||||
#include "code\game\objects\items\implants\implant_slave.dm"
|
||||
#include "code\game\objects\items\implants\implant_spell.dm"
|
||||
#include "code\game\objects\items\implants\implant_stealth.dm"
|
||||
#include "code\game\objects\items\implants\implant_storage.dm"
|
||||
#include "code\game\objects\items\implants\implant_track.dm"
|
||||
#include "code\game\objects\items\implants\implant_uplink.dm"
|
||||
#include "code\game\objects\items\implants\implantcase.dm"
|
||||
#include "code\game\objects\items\implants\implantchair.dm"
|
||||
#include "code\game\objects\items\implants\implanter.dm"
|
||||
#include "code\game\objects\items\implants\implantpad.dm"
|
||||
#include "code\game\objects\items\implants\implantuplink.dm"
|
||||
#include "code\game\objects\items\melee\energy.dm"
|
||||
#include "code\game\objects\items\melee\misc.dm"
|
||||
#include "code\game\objects\items\melee\transforming.dm"
|
||||
|
||||
Reference in New Issue
Block a user