Immovable Rod Z-level fix (#15391)

* Rod fix

* Meteors and helpers
This commit is contained in:
SabreML
2021-01-30 22:11:18 +00:00
committed by GitHub
parent ad6fb0549a
commit 7fd5970600
2 changed files with 15 additions and 13 deletions
+2 -2
View File
@@ -28,8 +28,8 @@ GLOBAL_LIST_INIT(meteors_ops, list(/obj/effect/meteor/goreops)) //Meaty Ops
var/max_i = 10//number of tries to spawn meteor.
while(!istype(pickedstart, /turf/space))
var/startSide = pick(GLOB.cardinal)
pickedstart = spaceDebrisStartLoc(startSide, 1)
pickedgoal = spaceDebrisFinishLoc(startSide, 1)
pickedstart = spaceDebrisStartLoc(startSide, level_name_to_num(MAIN_STATION))
pickedgoal = spaceDebrisFinishLoc(startSide, level_name_to_num(MAIN_STATION))
max_i--
if(max_i<=0)
return
+13 -11
View File
@@ -15,8 +15,8 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
/datum/event/immovable_rod/start()
var/startside = pick(GLOB.cardinal)
var/turf/startT = spaceDebrisStartLoc(startside, 1)
var/turf/endT = spaceDebrisFinishLoc(startside, 1)
var/turf/startT = spaceDebrisStartLoc(startside, level_name_to_num(MAIN_STATION))
var/turf/endT = spaceDebrisFinishLoc(startside, level_name_to_num(MAIN_STATION))
new /obj/effect/immovablerod/event(startT, endT)
/obj/effect/immovablerod
@@ -25,8 +25,8 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
icon = 'icons/obj/objects.dmi'
icon_state = "immrod"
throwforce = 100
density = 1
anchored = 1
density = TRUE
anchored = TRUE
var/z_original = 0
var/destination
var/notify = TRUE
@@ -41,9 +41,9 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
if(notify)
notify_ghosts("\A [src] is inbound!",
enter_link="<a href=?src=[UID()];follow=1>(Click to follow)</a>",
source=src, action=NOTIFY_FOLLOW)
source = src, action = NOTIFY_FOLLOW)
GLOB.poi_list |= src
if(end && end.z==z_original)
if(end?.z == z_original)
walk_towards(src, destination, move_delay)
/obj/effect/immovablerod/Topic(href, href_list)
@@ -67,21 +67,23 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
/obj/effect/immovablerod/Bump(atom/clong)
if(prob(10))
playsound(src, 'sound/effects/bang.ogg', 50, 1)
playsound(src, 'sound/effects/bang.ogg', 50, TRUE)
audible_message("CLANG")
if(clong && prob(25))
x = clong.x
y = clong.y
if(istype(clong, /turf) || istype(clong, /obj))
if(isturf(clong) || isobj(clong))
if(clong.density)
clong.ex_act(2)
else if(istype(clong, /mob))
if(istype(clong, /mob/living/carbon/human))
else if(ismob(clong))
if(ishuman(clong))
var/mob/living/carbon/human/H = clong
H.visible_message("<span class='danger'>[H.name] is penetrated by an immovable rod!</span>" , "<span class='userdanger'>The rod penetrates you!</span>" , "<span class ='danger'>You hear a CLANG!</span>")
H.visible_message("<span class='danger'>[H.name] is penetrated by an immovable rod!</span>" ,
"<span class='userdanger'>The rod penetrates you!</span>" ,
"<span class ='danger'>You hear a CLANG!</span>")
H.adjustBruteLoss(160)
if(clong.density || prob(10))
clong.ex_act(2)