[MIRROR] Fixes various immovable rod bugs, adds logging (#1568)

* Fixes various immovable rod bugs (#54770)

* Fixes various immovable rod bugs, adds logging

Co-authored-by: skoglol <33292112+kriskog@users.noreply.github.com>
This commit is contained in:
SkyratBot
2020-11-04 14:53:11 +01:00
committed by GitHub
co-authored by skoglol
parent 3f00f9a4d9
commit 0f737f3b1d
2 changed files with 24 additions and 18 deletions
+5 -2
View File
@@ -22,6 +22,8 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
var/aimed = alert("Aimed at current location?","Sniperod", "Yes", "No")
if(aimed == "Yes")
special_target = get_turf(usr)
message_admins("[key_name_admin(usr)] has aimed an immovable rod at [AREACOORD(special_target)].")
log_admin("[key_name_admin(usr)] has aimed an immovable rod at [AREACOORD(special_target)].")
/datum/round_event/immovable_rod
announceWhen = 5
@@ -34,8 +36,9 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
var/startside = pick(GLOB.cardinals)
var/z = pick(SSmapping.levels_by_trait(ZTRAIT_STATION))
var/turf/startT = spaceDebrisStartLoc(startside, z)
var/turf/endT = spaceDebrisFinishLoc(startside, z)
var/turf/endT = get_edge_target_turf(get_random_station_turf(), turn(startside, 180))
var/atom/rod = new /obj/effect/immovablerod(startT, endT, C.special_target)
C.special_target = null //Cleanup for future event rolls.
announce_to_ghosts(rod)
/obj/effect/immovablerod
@@ -106,7 +109,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
. = ..()
/obj/effect/immovablerod/Moved()
if((z != z_original) || (loc == destination))
if((z != z_original))
qdel(src)
if(special_target && loc == get_turf(special_target))
complete_trajectory()