Awaken, code.
This commit is contained in:
@@ -164,8 +164,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."
|
||||
|
||||
@@ -414,3 +414,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 ..()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "reagents"
|
||||
container_type = OPENCONTAINER
|
||||
activated = FALSE
|
||||
var/obj/item/chemholder
|
||||
var/obj/item/imp_chemholder/chemholder
|
||||
|
||||
/obj/item/implant/chem/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
@@ -33,18 +33,23 @@
|
||||
|
||||
/obj/item/implant/chem/implant(mob/living/target, mob/user, silent = FALSE)
|
||||
. = ..()
|
||||
if(.)
|
||||
chemholder = new(imp_in)
|
||||
chemholder.resistance_flags |= INDESTRUCTIBLE //bomb-proofing.
|
||||
chemholder.item_flags |= DROPDEL
|
||||
reagents.trans_to(chemholder, reagents.total_volume)
|
||||
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(.)
|
||||
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")
|
||||
@@ -79,3 +84,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,7 +11,7 @@
|
||||
var/popup = FALSE // is the DOUWANNABLOWUP window open?
|
||||
var/active = FALSE
|
||||
|
||||
/obj/item/implant/sad_trombone/trigger(emote, mob/source)
|
||||
/obj/item/implant/explosive/trigger(emote, mob/source)
|
||||
if(emote == "deathgasp")
|
||||
activate("death")
|
||||
|
||||
|
||||
@@ -78,62 +78,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
|
||||
69
code/game/objects/items/implants/implant_radio.dm
Normal file
69
code/game/objects/items/implants/implant_radio.dm
Normal file
@@ -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
|
||||
@@ -3,8 +3,8 @@
|
||||
desc = "Track with this."
|
||||
activated = 0
|
||||
|
||||
/obj/item/implant/tracking/New()
|
||||
..()
|
||||
/obj/item/implant/tracking/Initialize()
|
||||
. = ..()
|
||||
GLOB.tracked_implants += src
|
||||
|
||||
/obj/item/implant/tracking/Destroy()
|
||||
@@ -15,7 +15,28 @@
|
||||
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
|
||||
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
|
||||
Reference in New Issue
Block a user