mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 10:03:50 +01:00
Merge pull request #5107 from Fox-McCloud/buttonssss
Fixes Performance Issue with Action buttons, removes redundant verbs
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
return ..()
|
||||
|
||||
|
||||
/mob/living/carbon/brain/update_canmove()
|
||||
/mob/living/carbon/brain/update_canmove(delay_action_updates = 0)
|
||||
if(in_contents_of(/obj/mecha))
|
||||
canmove = 1
|
||||
use_me = 1 //If it can move, let it emote
|
||||
@@ -59,7 +59,8 @@
|
||||
else
|
||||
canmove = 0
|
||||
|
||||
update_action_buttons_icon()
|
||||
if(!delay_action_updates)
|
||||
update_action_buttons_icon()
|
||||
return canmove
|
||||
|
||||
/mob/living/carbon/brain/ex_act() //you cant blow up brainmobs because it makes transfer_to() freak out when borgs blow up.
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
handle_disabilities() // eye, ear, brain damages
|
||||
handle_status_effects() //all special effects, stunned, weakened, jitteryness, hallucination, sleeping, etc
|
||||
|
||||
update_canmove()
|
||||
update_canmove(1) // set to 1 to not update icon action buttons; rip this argument out if Life is ever refactored to be non-stupid. -Fox
|
||||
|
||||
if(client)
|
||||
//regular_hud_updates() //THIS DOESN'T FUCKING UPDATE SHIT
|
||||
|
||||
@@ -521,7 +521,7 @@
|
||||
to_chat(src, "<span class='warning'>You are far too small to pull anything!</span>")
|
||||
return
|
||||
|
||||
/mob/living/silicon/pai/update_canmove()
|
||||
/mob/living/silicon/pai/update_canmove(delay_action_updates = 0)
|
||||
. = ..()
|
||||
density = 0 //this is reset every canmove update otherwise
|
||||
|
||||
|
||||
@@ -337,7 +337,7 @@
|
||||
/mob/living/silicon/robot/drone/remove_robot_verbs()
|
||||
src.verbs -= silicon_subsystems
|
||||
|
||||
/mob/living/silicon/robot/drone/update_canmove()
|
||||
/mob/living/silicon/robot/drone/update_canmove(delay_action_updates = 0)
|
||||
. = ..()
|
||||
density = 0 //this is reset every canmove update otherwise
|
||||
|
||||
|
||||
@@ -227,13 +227,14 @@
|
||||
weapon_lock = 0
|
||||
weaponlock_time = 120
|
||||
|
||||
/mob/living/silicon/robot/update_canmove()
|
||||
/mob/living/silicon/robot/update_canmove(delay_action_updates = 0)
|
||||
if(paralysis || stunned || weakened || buckled || lockcharge)
|
||||
canmove = 0
|
||||
else
|
||||
canmove = 1
|
||||
update_transform()
|
||||
update_action_buttons_icon()
|
||||
if(!delay_action_updates)
|
||||
update_action_buttons_icon()
|
||||
return canmove
|
||||
|
||||
//Robots on fire
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
diag_hud.add_hud_to(src)
|
||||
permanent_huds |= diag_hud
|
||||
|
||||
/mob/living/simple_animal/bot/update_canmove()
|
||||
/mob/living/simple_animal/bot/update_canmove(delay_action_updates = 0)
|
||||
. = ..()
|
||||
if(!on)
|
||||
. = 0
|
||||
|
||||
@@ -617,7 +617,7 @@
|
||||
|
||||
return verb
|
||||
|
||||
/mob/living/simple_animal/update_canmove()
|
||||
/mob/living/simple_animal/update_canmove(delay_action_updates = 0)
|
||||
if(paralysis || stunned || weakened || stat || resting)
|
||||
drop_r_hand()
|
||||
drop_l_hand()
|
||||
@@ -627,7 +627,8 @@
|
||||
else
|
||||
canmove = 1
|
||||
update_transform()
|
||||
update_action_buttons_icon()
|
||||
if(!delay_action_updates)
|
||||
update_action_buttons_icon()
|
||||
return canmove
|
||||
|
||||
/mob/living/simple_animal/update_transform()
|
||||
|
||||
@@ -1016,7 +1016,7 @@ var/list/slot_equipment_priority = list( \
|
||||
return 1
|
||||
|
||||
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
|
||||
/mob/proc/update_canmove()
|
||||
/mob/proc/update_canmove(delay_action_updates = 0)
|
||||
var/ko = weakened || paralysis || stat || (status_flags & FAKEDEATH)
|
||||
var/buckle_lying = !(buckled && !buckled.buckle_lying)
|
||||
if(ko || resting || stunned)
|
||||
@@ -1041,7 +1041,8 @@ var/list/slot_equipment_priority = list( \
|
||||
layer = initial(layer)
|
||||
|
||||
update_transform()
|
||||
update_action_buttons_icon()
|
||||
if(!delay_action_updates)
|
||||
update_action_buttons_icon()
|
||||
return canmove
|
||||
|
||||
/mob/proc/fall(var/forced)
|
||||
|
||||
Reference in New Issue
Block a user