mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
Upgrades GODMODE from a flag to a trait. (#86596)
## About The Pull Request GODMODE has a lot of sources that toggle it. From admin-stuff to status effects, components, actions and mobs which are supposed to be invincible. It's better off as a trait than a flag, so we can manage these sources. ## Why It's Good For The Game See above. ## Changelog 🆑 admin: godmode is now a datum trait instead of a bitflag. This means the process for toggling it is a little different now. /🆑
This commit is contained in:
@@ -425,8 +425,7 @@
|
||||
if(!user)
|
||||
return
|
||||
|
||||
user.status_flags &= ~GODMODE
|
||||
REMOVE_TRAIT(user, TRAIT_NO_TRANSFORM, REF(src))
|
||||
user.remove_traits(list(TRAIT_GODMODE, TRAIT_NO_TRANSFORM), REF(src))
|
||||
user.forceMove(get_turf(src))
|
||||
user.visible_message(span_danger("[user] pops back into reality!"))
|
||||
|
||||
@@ -437,8 +436,7 @@
|
||||
setDir(user.dir)
|
||||
|
||||
user.forceMove(src)
|
||||
ADD_TRAIT(user, TRAIT_NO_TRANSFORM, REF(src))
|
||||
user.status_flags |= GODMODE
|
||||
user.add_traits(list(TRAIT_GODMODE, TRAIT_NO_TRANSFORM), REF(src))
|
||||
|
||||
user_ref = WEAKREF(user)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user