mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-06 15:02:29 +00:00
## About The Pull Request I've fucked up the logic, so it requires the user to be both the host and an admin to open it, which was the case when I tested it locally. This PR fixes that and other issues (and **un**dumbs some of the code). The spinning screen modifier has also been scrapped for being downright awful and breaking my screen. ## Why It's Good For The Game Fixing stuff I've thankfully noticed early. ## Changelog 🆑 fix: The deathmatch modifiers modal menu can actually be opened now. Also fixed a bunch of issues it had. /🆑
18 lines
618 B
Plaintext
18 lines
618 B
Plaintext
/datum/element/inverted_movement
|
|
|
|
/datum/element/inverted_movement/Attach(datum/target)
|
|
. = ..()
|
|
if(!isliving(target))
|
|
return ELEMENT_INCOMPATIBLE
|
|
RegisterSignal(target, COMSIG_MOB_CLIENT_PRE_MOVE, PROC_REF(invert_movement))
|
|
|
|
/datum/element/inverted_movement/Detach(datum/source)
|
|
UnregisterSignal(source, COMSIG_MOB_CLIENT_PRE_MOVE)
|
|
return ..()
|
|
|
|
/datum/element/inverted_movement/proc/invert_movement(mob/living/source, move_args)
|
|
SIGNAL_HANDLER
|
|
var/new_direct = REVERSE_DIR(move_args[MOVE_ARG_DIRECTION])
|
|
move_args[MOVE_ARG_DIRECTION] = new_direct
|
|
move_args[MOVE_ARG_NEW_LOC] = get_step(source, new_direct)
|