Files
GS13NG/code/game/objects/items/implants/implant_abductor.dm
T
kevinz000 c638386507 Syncs maps, and a bunch of other things that no one will care about/notice/give fucks about until they break. Welcome to conflict hell. (#2460)
* fuck pubby

* fuck you too ceres

* ree

* this is going to be a disaster isn't it

* disaster

* dme

* -_-

* tg

* woops

* proper sync

* Welcome to conflict hell.

* lets hope this fixes more things than it breaks

* gdi

* goddamnit
2017-08-24 21:07:58 -07:00

47 lines
1.3 KiB
Plaintext

/obj/item/implant/abductor
name = "recall implant"
desc = "Returns you to the mothership."
icon = 'icons/obj/abductor.dmi'
icon_state = "implant"
activated = 1
origin_tech = "materials=2;biotech=7;magnets=4;bluespace=4;abductor=5"
var/obj/machinery/abductor/pad/home
var/cooldown = 30
/obj/item/implant/abductor/activate()
if(cooldown == initial(cooldown))
home.Retrieve(imp_in,1)
cooldown = 0
START_PROCESSING(SSobj, src)
else
to_chat(imp_in, "<span class='warning'>You must wait [30 - cooldown] seconds to use [src] again!</span>")
/obj/item/implant/abductor/process()
if(cooldown < initial(cooldown))
cooldown++
if(cooldown == initial(cooldown))
STOP_PROCESSING(SSobj, src)
/obj/item/implant/abductor/implant(mob/living/target, mob/user)
if(..())
var/obj/machinery/abductor/console/console
if(ishuman(target))
var/mob/living/carbon/human/H = target
if(H.dna.species.id == "abductor")
var/datum/species/abductor/S = H.dna.species
console = get_team_console(S.team)
home = console.pad
if(!home)
console = get_team_console(pick(1, 2, 3, 4))
home = console.pad
return 1
/obj/item/implant/abductor/proc/get_team_console(var/team)
var/obj/machinery/abductor/console/console
for(var/obj/machinery/abductor/console/c in GLOB.machines)
if(c.team == team)
console = c
break
return console