mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 23:52:12 +00:00
Openturf throw fix & minor refactors (#2203)
changes: Thrown objects will now fire Entered() on the turf they land on. As a result, they will now fall if they land on an openturf. Openturfs now queue an icon update if something falls down. /obj/item/weapon/ore_radar converted to use SSfast_process instead of a spawn loop. Converted hand-held tanks' New() to Initialize(). Note: This PR allows grenades to be thrown down openturfs.
This commit is contained in:
@@ -650,13 +650,20 @@
|
||||
if(!active)
|
||||
active = 1
|
||||
usr << "<span class='notice'>You activate the pinpointer</span>"
|
||||
workdisk(user)
|
||||
START_PROCESSING(SSfast_process, src)
|
||||
else
|
||||
active = 0
|
||||
icon_state = "pinoff"
|
||||
usr << "<span>You deactivate the pinpointer</span>"
|
||||
STOP_PROCESSING(SSfast_process, src)
|
||||
|
||||
/obj/item/weapon/ore_radar/proc/workdisk(var/user)
|
||||
/obj/item/weapon/ore_radar/process()
|
||||
if (active)
|
||||
workdisk()
|
||||
else
|
||||
STOP_PROCESSING(SSfast_process, src)
|
||||
|
||||
/obj/item/weapon/ore_radar/proc/workdisk()
|
||||
if(!src.loc)
|
||||
active = 0
|
||||
|
||||
@@ -665,8 +672,8 @@
|
||||
|
||||
var/closest = 15
|
||||
|
||||
for(var/turf/simulated/mineral/random/R in orange(14,user))
|
||||
var/dist = get_dist(user, R)
|
||||
for(var/turf/simulated/mineral/random/R in orange(14,loc))
|
||||
var/dist = get_dist(loc, R)
|
||||
if(dist < closest)
|
||||
closest = dist
|
||||
sonar = R
|
||||
@@ -674,8 +681,8 @@
|
||||
if(!sonar)
|
||||
icon_state = "pinonnull"
|
||||
return
|
||||
set_dir(get_dir(user,sonar))
|
||||
switch(get_dist(user,sonar))
|
||||
set_dir(get_dir(loc,sonar))
|
||||
switch(get_dist(loc,sonar))
|
||||
if(0)
|
||||
icon_state = "pinondirect"
|
||||
if(1 to 8)
|
||||
@@ -684,7 +691,6 @@
|
||||
icon_state = "pinonmedium"
|
||||
if(16 to INFINITY)
|
||||
icon_state = "pinonfar"
|
||||
spawn(5) .()
|
||||
|
||||
/**********************Jaunter**********************/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user