adds new z-level trait to disable parallax (#66637) (#13353)

* first push woohoo

* more stuff

* Update code/datums/components/z_parallax.dm

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>

* mothblockification

* fuck

* fuck 2

* uh

* uh yeah style stuff ig

* more changes

* last changes

* fuck

* fuck 2

* i hate potatopotato

* i hate potato * 2

* a

* god

* woops

* Update code/modules/mapping/space_management/traits.dm

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>

* Update code/modules/mapping/space_management/traits.dm

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>

* Update code/modules/mapping/space_management/traits.dm

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>

Co-authored-by: magatsuchi <88991542+magatsuchi@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-05-07 23:14:14 +02:00
committed by GitHub
parent 64ba3890c8
commit bca6a53e8e
12 changed files with 122 additions and 18 deletions

View File

@@ -142,6 +142,8 @@ GLOBAL_LIST_INIT(available_erp_ui_styles, list(
owner.overlay_fullscreen("see_through_darkness", /atom/movable/screen/fullscreen/see_through_darkness)
AddComponent(/datum/component/zparallax, owner.client)
/datum/hud/Destroy()
if(mymob.hud_used == src)
mymob.hud_used = null

View File

@@ -47,6 +47,8 @@
/datum/hud/proc/apply_parallax_pref(mob/viewmob)
var/mob/screenmob = viewmob || mymob
if(SSmapping.level_trait(screenmob.z, ZTRAIT_NOPARALLAX))
return FALSE
if (SSlag_switch.measures[DISABLE_PARALLAX] && !HAS_TRAIT(viewmob, TRAIT_BYPASS_MEASURES))
return FALSE