mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 16:44:33 +01:00
Refactor spawning on vents into one proc
This commit is contained in:
+6
-13
@@ -1094,21 +1094,14 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
return
|
||||
|
||||
//find a viable mouse candidate
|
||||
var/mob/living/simple_animal/mouse/host
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
|
||||
var/list/found_vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in SSair.atmos_machinery)
|
||||
if(!v.welded && v.z == src.z)
|
||||
found_vents.Add(v)
|
||||
if(found_vents.len)
|
||||
vent_found = pick(found_vents)
|
||||
host = new /mob/living/simple_animal/mouse(vent_found.loc)
|
||||
else
|
||||
to_chat(src, "<span class='warning'>Unable to find any unwelded vents to spawn mice at.</span>")
|
||||
|
||||
if(host)
|
||||
var/list/found_vents = get_valid_vent_spawns(min_network_size = 0, station_levels_only = FALSE, z_level = z)
|
||||
if(length(found_vents))
|
||||
var/obj/vent_found = pick(found_vents)
|
||||
var/mob/living/simple_animal/mouse/host = new(vent_found.loc)
|
||||
host.ckey = src.ckey
|
||||
to_chat(host, "<span class='info'>You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent.</span>")
|
||||
else
|
||||
to_chat(src, "<span class='warning'>Unable to find any unwelded vents to spawn mice at.</span>")
|
||||
|
||||
/mob/proc/assess_threat() //For sec bot threat assessment
|
||||
return 5
|
||||
|
||||
Reference in New Issue
Block a user