mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
[s] Golems target Free Golem ship when jaunting
This commit is contained in:
+20
-2
@@ -319,9 +319,27 @@ Proc for attack log creation, because really why not
|
||||
if(progbar)
|
||||
qdel(progbar)
|
||||
|
||||
/proc/isabductor(A)
|
||||
/proc/is_species(A, species_datum)
|
||||
. = FALSE
|
||||
if(ishuman(A))
|
||||
var/mob/living/carbon/human/H = A
|
||||
if(H.dna && istype(H.dna.species, /datum/species/abductor))
|
||||
if(H.dna && istype(H.dna.species, species_datum))
|
||||
. = TRUE
|
||||
|
||||
/proc/isabductor(A)
|
||||
. = is_species(A, /datum/species/abductor)
|
||||
|
||||
/proc/isgolem(A)
|
||||
. = is_species(A, /datum/species/golem)
|
||||
|
||||
/proc/islizard(A)
|
||||
. = is_species(A, /datum/species/lizard)
|
||||
|
||||
/proc/isplasmaman(A)
|
||||
. = is_species(A, /datum/species/plasmaman)
|
||||
|
||||
/proc/ispodperson(A)
|
||||
. = is_species(A, /datum/species/pod)
|
||||
|
||||
/proc/isflyperson(A)
|
||||
. = is_species(A, /datum/species/fly)
|
||||
|
||||
@@ -515,15 +515,31 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/device/wormhole_jaunter/proc/get_destinations(mob/user)
|
||||
var/list/destinations = list()
|
||||
|
||||
if(isgolem(user))
|
||||
for(var/obj/item/device/radio/beacon/B in world)
|
||||
var/turf/T = get_turf(B)
|
||||
if(istype(T.loc, /area/ruin/powered/golem_ship))
|
||||
destinations += B
|
||||
|
||||
// In the event golem beacon is destroyed, send to station instead
|
||||
if(destinations.len)
|
||||
return destinations
|
||||
|
||||
for(var/obj/item/device/radio/beacon/B in world)
|
||||
var/turf/T = get_turf(B)
|
||||
if(T.z == ZLEVEL_STATION)
|
||||
destinations += B
|
||||
|
||||
return destinations
|
||||
|
||||
/obj/item/device/wormhole_jaunter/proc/activate(mob/user)
|
||||
if(!turf_check(user))
|
||||
return
|
||||
|
||||
var/list/L = list()
|
||||
for(var/obj/item/device/radio/beacon/B in world)
|
||||
var/turf/T = get_turf(B)
|
||||
if(T.z == ZLEVEL_STATION)
|
||||
L += B
|
||||
var/list/L = get_destinations(user)
|
||||
if(!L.len)
|
||||
user << "<span class='notice'>The [src.name] found no beacons in the world to anchor a wormhole to.</span>"
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user