Refactor move code

This commit is contained in:
Aronai Sieyes
2020-04-26 16:42:50 -04:00
parent 5874df8756
commit d3da6ae4a5
45 changed files with 359 additions and 429 deletions
@@ -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"
+3 -12
View File
@@ -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