* end of file Fix

* fix those lints too

* .

* implements the falling to turfs

* move to the right planet

* use turf proc for effect

* just some types

* .

* .

* .

* .

* .

* .

* .

* revert
This commit is contained in:
Kashargul
2025-03-11 20:27:06 -04:00
committed by GitHub
parent a1445ee3f0
commit 0bf3af4147
32 changed files with 144 additions and 106 deletions
+8 -41
View File
@@ -203,53 +203,20 @@ GLOBAL_LIST_EMPTY(tele_landmarks)
/obj/effect/step_trigger/teleporter/planetary_fall
var/datum/planet/planet = null
/obj/effect/step_trigger/teleporter/planetary_fall/Destroy()
. = ..()
planet = null
// First time setup, which planet are we aiming for?
/obj/effect/step_trigger/teleporter/planetary_fall/proc/find_planet()
return
/obj/effect/step_trigger/teleporter/planetary_fall/Trigger(var/atom/movable/A)
if(!planet)
find_planet()
if(planet)
if(!planet.planet_floors.len)
message_admins("ERROR: planetary_fall step trigger's list of outdoor floors was empty.")
return
var/turf/simulated/T = null
var/safety = 100 // Infinite loop protection.
while(!T && safety)
var/turf/simulated/candidate = pick(planet.planet_floors)
if(!istype(candidate) || istype(candidate, /turf/simulated/sky))
safety--
continue
else if(candidate && !candidate.is_outdoors())
safety--
continue
else
T = candidate
break
if(!T)
message_admins("ERROR: planetary_fall step trigger could not find a suitable landing turf.")
return
if(isobserver(A))
A.forceMove(T) // Harmlessly move ghosts.
return
//VOREStation Edit Start
if(!(A.can_fall()))
return // Phased shifted kin should not fall
//VOREStation Edit End
A.forceMove(T)
// Living things should probably be logged when they fall...
if(isliving(A))
message_admins("\The [A] fell out of the sky.")
// ... because they're probably going to die from it.
A.fall_impact(T, 42, 90, FALSE, TRUE) //You will not be defibbed from this.
else
message_admins("ERROR: planetary_fall step trigger lacks a planet to fall onto.")
var/turf/T = get_turf(A)
if(!T)
return
T.trigger_fall(A, planet)
//Death
@@ -44,7 +44,7 @@
if(isanimal(bound_mob))
. += span_notice("[bound_mob.health / bound_mob.maxHealth * 100]%")
if(bound_mob.ooc_notes)
. += span_deptradio("OOC Notes:") + " <a href='byond://?src=\ref[bound_mob];ooc_notes=1'>\[View\]</a> - <a href='byond://?src=\ref[src];print_ooc_notes_to_chat=1'>\[Print\]</a>"
. += span_deptradio("OOC Notes:") + " <a href='byond://?src=\ref[bound_mob];ooc_notes=1'>\[View\]</a> - <a href='byond://?src=\ref[src];print_ooc_notes_chat=1'>\[Print\]</a>"
. += span_deptradio("<a href='byond://?src=\ref[bound_mob];vore_prefs=1'>\[Mechanical Vore Preferences\]</a>")
//Command! This lets the owner toggle hostile on AI controlled mobs, or send a silent command message to your bound mob, wherever they may be.