mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 17:45:02 +01:00
[MIRROR] Refactors how movetype flags are added and removed and the floating animation (#2096)
* Refactors how movetype flags are added and removed and the floating animation (#54963) I wanted to refactor how movetype flags are added and removed into traits to prevent multiple sources of specific movement types from conflicting one other. I ended up also having to refactor the floating animation loop (the one that bobs up and down) code in the process. Why It's Good For The Game A way to avoid conflict from multiple sources of movement types. This also stops melee attacks, jitteriness and update_transform() from temporarily disabling the floating movetype bitflag altogether until the next life tick. Tested, but i'm pretty sure improvements could be made. Changelog cl fix: jitteriness, melee attack animations and resting/standing up should no longer momentarily remove the floating movement type. /cl * Refactors how movetype flags are added and removed and the floating animation Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
@@ -1475,7 +1475,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
var/source = "adminabuse"
|
||||
switch(add_or_remove)
|
||||
if("Add") //Not doing source choosing here intentionally to make this bit faster to use, you can always vv it.
|
||||
ADD_TRAIT(D,chosen_trait,source)
|
||||
if(GLOB.movement_type_trait_to_flag[chosen_trait]) //big damn exception.
|
||||
var/atom/movable/AM = D
|
||||
ADD_MOVE_TRAIT(AM, chosen_trait,source)
|
||||
else
|
||||
ADD_TRAIT(D,chosen_trait,source)
|
||||
if("Remove")
|
||||
var/specific = input("All or specific source ?", "Trait Remove/Add") as null|anything in list("All","Specific")
|
||||
if(!specific)
|
||||
|
||||
Reference in New Issue
Block a user