mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 13:39:16 +01:00
code/global.dm => code/_global_vars/ (#17244)
* 1 * Full conversion * . * . --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -347,8 +347,8 @@
|
||||
return span_italics("[tt_desc]")
|
||||
|
||||
/mob/living/simple_mob/make_hud_overlays()
|
||||
hud_list[STATUS_HUD] = gen_hud_image(buildmode_hud, src, "ai_0", plane = PLANE_BUILDMODE)
|
||||
hud_list[LIFE_HUD] = gen_hud_image(buildmode_hud, src, "ais_1", plane = PLANE_BUILDMODE)
|
||||
hud_list[STATUS_HUD] = gen_hud_image(GLOB.buildmode_hud, src, "ai_0", plane = PLANE_BUILDMODE)
|
||||
hud_list[LIFE_HUD] = gen_hud_image(GLOB.buildmode_hud, src, "ais_1", plane = PLANE_BUILDMODE)
|
||||
add_overlay(hud_list)
|
||||
|
||||
//Makes it so that simplemobs can understand galcomm without being able to speak it.
|
||||
|
||||
@@ -1077,7 +1077,7 @@ GLOBAL_VAR_INIT(teppi_count, 0) // How mant teppi DO we have?
|
||||
tepholder.lay_down()
|
||||
return
|
||||
var/moving_to = 0 // Apparently this is required or it always picks 4, according to the previous developer for simplemob AI.
|
||||
moving_to = pick(cardinal)
|
||||
moving_to = pick(GLOB.cardinal)
|
||||
holder.set_dir(moving_to)
|
||||
T = get_step(holder,moving_to)
|
||||
// Finally do move if we actually found somewhere we'd like to go
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
else
|
||||
to_world("Going to move away randomly")
|
||||
var/turf/move_to = get_turf(L)
|
||||
move_to = get_step(move_to, pick(cardinal))
|
||||
move_to = get_step(move_to, pick(GLOB.cardinal))
|
||||
for(var/i = 1 to vision_range) // Move them this many steps away from where they were before.
|
||||
move_to = get_step_away(move_to, L, 7)
|
||||
if(move_to)
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
I.attack_hand(holder)
|
||||
lose_target()
|
||||
if(isliving(A) && holder.Adjacent(A)) // Not the dumbest tool in the shed. If we're fighting, we're gonna dance around them.
|
||||
holder.IMove(get_step(holder, pick(alldirs)))
|
||||
holder.IMove(get_step(holder, pick(GLOB.alldirs)))
|
||||
holder.face_atom(A)
|
||||
request_help() // And we're going to call friends, too.
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
/datum/ai_holder/simple_mob/siffet/post_melee_attack(atom/A) //Evasive
|
||||
if(holder.Adjacent(A))
|
||||
holder.IMove(get_step(holder, pick(alldirs)))
|
||||
holder.IMove(get_step(holder, pick(GLOB.alldirs)))
|
||||
holder.face_atom(A)
|
||||
|
||||
/mob/living/simple_mob/animal/sif/siffet/IIsAlly(mob/living/L)
|
||||
|
||||
@@ -309,7 +309,7 @@
|
||||
on_engagement(target)
|
||||
if(firing_lanes && !test_projectile_safety(target))
|
||||
// Nudge them a bit, maybe they can shoot next time.
|
||||
var/turf/T = get_step(holder, pick(cardinal))
|
||||
var/turf/T = get_step(holder, pick(GLOB.cardinal))
|
||||
if(T)
|
||||
holder.IMove(T) // IMove() will respect movement cooldown.
|
||||
holder.face_atom(target)
|
||||
|
||||
@@ -370,7 +370,7 @@
|
||||
on_engagement(target)
|
||||
if(firing_lanes && !test_projectile_safety(target))
|
||||
// Nudge them a bit, maybe they can shoot next time.
|
||||
var/turf/T = get_step(holder, pick(cardinal))
|
||||
var/turf/T = get_step(holder, pick(GLOB.cardinal))
|
||||
if(T)
|
||||
holder.IMove(T) // IMove() will respect movement cooldown.
|
||||
holder.face_atom(target)
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
//Affect nearby lights
|
||||
var/destroy_lights = 0
|
||||
|
||||
for(var/obj/machinery/light/L in machines)
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
if(L.z != z || get_dist(src,L) > 10)
|
||||
continue
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
on_engagement(target)
|
||||
if(firing_lanes && !test_projectile_safety(target))
|
||||
// Nudge them a bit, maybe they can shoot next time.
|
||||
var/turf/T = get_step(holder, pick(cardinal))
|
||||
var/turf/T = get_step(holder, pick(GLOB.cardinal))
|
||||
if(T)
|
||||
holder.IMove(T) // IMove() will respect movement cooldown.
|
||||
holder.face_atom(target)
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
return
|
||||
|
||||
var/moving_to = 0 // Apparently this is required or it always picks 4, according to the previous developer for simplemob AI.
|
||||
moving_to = pick(cardinal)
|
||||
moving_to = pick(GLOB.cardinal)
|
||||
holder.set_dir(moving_to)
|
||||
holder.IMove(get_step(holder,moving_to))
|
||||
wander_delay = base_wander_delay
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
on_engagement(target)
|
||||
if(firing_lanes && !test_projectile_safety(target))
|
||||
// Nudge them a bit, maybe they can shoot next time.
|
||||
var/turf/T = get_step(holder, pick(cardinal))
|
||||
var/turf/T = get_step(holder, pick(GLOB.cardinal))
|
||||
if(T)
|
||||
holder.IMove(T) // IMove() will respect movement cooldown.
|
||||
holder.face_atom(target)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
//Affect nearby lights
|
||||
|
||||
|
||||
for(var/obj/machinery/light/L in machines)
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
if(L.z != z || get_dist(src,L) > 10)
|
||||
continue
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
if(ishuman(prey))
|
||||
vore_selected.digest_mode = DM_HOLD
|
||||
if(check_threat(prey) >= 4)
|
||||
global_announcer.autosay("[src] is detaining suspect <b>[target_name(prey)]</b> in <b>[get_area(src)]</b>.", "SmartCollar oversight", "Security")
|
||||
GLOB.global_announcer.autosay("[src] is detaining suspect <b>[target_name(prey)]</b> in <b>[get_area(src)]</b>.", "SmartCollar oversight", "Security")
|
||||
if(istype(prey,/mob/living/simple_mob/animal/passive/mouse))
|
||||
vore_selected.digest_mode = DM_DIGEST
|
||||
. = ..()
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
if(eye_state == PURPLE_EYES)
|
||||
destroy_lights = 25
|
||||
|
||||
for(var/obj/machinery/light/L in machines)
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
if(L.z != z || get_dist(src,L) > 10)
|
||||
continue
|
||||
|
||||
|
||||
@@ -408,7 +408,7 @@
|
||||
|
||||
//Random walk
|
||||
if(!moving_to)
|
||||
moving_to = pick(cardinal)
|
||||
moving_to = pick(GLOB.cardinal)
|
||||
dir = moving_to
|
||||
|
||||
var/turf/T = get_step(src,moving_to)
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
on_engagement(target)
|
||||
if(firing_lanes && !test_projectile_safety(target))
|
||||
// Nudge them a bit, maybe they can shoot next time.
|
||||
var/turf/T = get_step(holder, pick(cardinal))
|
||||
var/turf/T = get_step(holder, pick(GLOB.cardinal))
|
||||
if(T)
|
||||
holder.IMove(T) // IMove() will respect movement cooldown.
|
||||
holder.face_atom(target)
|
||||
|
||||
Reference in New Issue
Block a user