mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 04:28:12 +01:00
Refactor move code
This commit is contained in:
@@ -15,13 +15,13 @@
|
||||
)
|
||||
|
||||
// make a screeching noise to drive people mad
|
||||
/obj/structure/ship_munition/disperser_charge/Move(atom/newloc, direct = 0)
|
||||
if((. = ..()) && prob(50))
|
||||
/obj/structure/ship_munition/disperser_charge/Moved(atom/old_loc, direction, forced = FALSE)
|
||||
. = ..()
|
||||
if(prob(50))
|
||||
var/turf/T = get_turf(src)
|
||||
if(!isspace(T) && !istype(T, /turf/simulated/floor/carpet))
|
||||
playsound(T, pick(move_sounds), 50, 1)
|
||||
|
||||
|
||||
/obj/structure/ship_munition/disperser_charge/fire
|
||||
name = "FR1-ENFER charge"
|
||||
color = "#b95a00"
|
||||
|
||||
@@ -19,19 +19,10 @@
|
||||
icon_state = pick(event_icon_states)
|
||||
GLOB.overmap_event_handler.update_hazards(loc)
|
||||
|
||||
/obj/effect/overmap/event/Move()
|
||||
var/turf/old_loc = loc
|
||||
/obj/effect/overmap/event/Moved(atom/old_loc, direction, forced = FALSE)
|
||||
. = ..()
|
||||
if(.)
|
||||
GLOB.overmap_event_handler.update_hazards(old_loc)
|
||||
GLOB.overmap_event_handler.update_hazards(loc)
|
||||
|
||||
/obj/effect/overmap/event/forceMove(atom/destination)
|
||||
var/old_loc = loc
|
||||
. = ..()
|
||||
if(.)
|
||||
GLOB.overmap_event_handler.update_hazards(old_loc)
|
||||
GLOB.overmap_event_handler.update_hazards(loc)
|
||||
GLOB.overmap_event_handler.update_hazards(old_loc)
|
||||
GLOB.overmap_event_handler.update_hazards(loc)
|
||||
|
||||
/obj/effect/overmap/event/Destroy()//takes a look at this one as well, make sure everything is A-OK
|
||||
var/turf/T = loc
|
||||
|
||||
Reference in New Issue
Block a user