Reactiveness update part 1: Removed click delays from most objects, keeping them on for attacks and breaking windows/grilles.

Signed-off-by: Mloc-Argent <colmohici@gmail.com>
This commit is contained in:
Mloc-Argent
2013-07-25 18:30:24 +01:00
parent f357d0c421
commit 9d2e107005
14 changed files with 50 additions and 39 deletions
+2 -1
View File
@@ -62,7 +62,7 @@
*/
/client/proc/fix_next_move()
set category = "Debug"
/* set category = "Debug"
set name = "Unfreeze Everyone"
var/largest_move_time = 0
var/largest_click_time = 0
@@ -90,6 +90,7 @@
message_admins("[key_name_admin(largest_click_mob)] had the largest click delay with [largest_click_time] frames / [largest_click_time/10] seconds!", 1)
message_admins("world.time = [world.time]", 1)
feedback_add_details("admin_verb","UFE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
*/
return
/client/proc/radio_report()
@@ -1114,9 +1114,9 @@ mob/living/carbon/human/yank_out_object()
set desc = "Remove an embedded item at the cost of bleeding and pain."
set src in view(1)
if(!isliving(usr) || usr.next_move > world.time)
if(!isliving(usr) || usr.last_click + usr.click_delay < world.time)
return
usr.next_move = world.time + 20
usr.delay_click(20)
if(usr.stat == 1)
usr << "You are unconcious and cannot do that!"
+1 -1
View File
@@ -33,7 +33,7 @@
if(hud_used) del(hud_used) //remove the hud objects
hud_used = new /datum/hud(src)
next_move = 1
last_click = world.time
sight |= SEE_SELF
..()
+2 -2
View File
@@ -900,9 +900,9 @@ mob/verb/yank_out_object()
set desc = "Remove an embedded item at the cost of bleeding and pain."
set src in view(1)
if(!isliving(usr) || usr.next_move > world.time)
if(!isliving(usr) || usr.last_click + usr.click_delay < world.time)
return
usr.next_move = world.time + 20
usr.delay_click(20)
if(usr.stat == 1)
usr << "You are unconcious and cannot do that!"
+2 -2
View File
@@ -54,8 +54,8 @@
var/sdisabilities = 0 //Carbon
var/disabilities = 0 //Carbon
var/atom/movable/pulling = null
var/next_move = null
var/prev_move = null
var/last_click = null
var/click_delay = 0
var/monkeyizing = null //Carbon
var/other = 0.0
var/hand = null
+3 -3
View File
@@ -128,7 +128,7 @@
return
if(killing)
return
if (assailant.next_move > world.time)
if (assailant.last_click + assailant.click_delay < world.time)
return
if ((!( assailant.canmove ) || assailant.lying))
//SN src = null
@@ -140,7 +140,7 @@
if (!( killing ))
assailant.visible_message("\red [assailant] has temporarily tightened \his grip on [affecting]!")
//Foreach goto(97)
assailant.next_move = world.time + 10
assailant.delay_click(10)
//affecting.stunned = max(2, affecting.stunned)
//affecting.paralysis = max(1, affecting.paralysis)
affecting.losebreath = min(affecting.losebreath + 1, 3)
@@ -235,7 +235,7 @@
assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>")
log_attack("<font color='red'>[assailant.name] ([assailant.ckey]) Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>")
assailant.next_move = world.time + 10
assailant.delay_click(10)
affecting.losebreath += 1
else
assailant.visible_message("\red [assailant] was unable to tighten \his grip on [affecting]'s neck!")
+4
View File
@@ -454,3 +454,7 @@ var/list/intents = list("help","disarm","grab","hurt")
hud_used.action_intent.icon_state = "harm"
else
hud_used.action_intent.icon_state = "help"
/mob/proc/delay_click(var/delay)
src.click_delay = max(src.click_delay, delay)
return src.click_delay
+6 -6
View File
@@ -600,9 +600,9 @@
set name = "Resist"
set category = "IC"
if(!isliving(usr) || usr.next_move > world.time)
if(!isliving(usr) || usr.last_click + usr.click_delay < world.time)
return
usr.next_move = world.time + 20
usr.delay_click(20)
var/mob/living/L = usr
@@ -639,7 +639,7 @@
if(iscarbon(L))
var/mob/living/carbon/C = L
if( C.handcuffed )
C.next_move = world.time + 100
C.delay_click(100)
C.last_special = world.time + 100
C << "\red You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)"
for(var/mob/O in viewers(L))
@@ -673,7 +673,7 @@
// breakout_time++ //Harder to get out of welded lockers than locked lockers
//okay, so the closet is either welded or locked... resist!!!
usr.next_move = world.time + 100
usr.delay_click(100)
L.last_special = world.time + 100
L << "\red You lean on the back of \the [C] and start pushing the door open. (this will take about [breakout_time] minutes)"
for(var/mob/O in viewers(usr.loc))
@@ -726,7 +726,7 @@
else if(iscarbon(L))
var/mob/living/carbon/CM = L
if(CM.handcuffed && CM.canmove && (CM.last_special <= world.time))
CM.next_move = world.time + 100
CM.delay_click(100)
CM.last_special = world.time + 100
if(isalienadult(CM) || (HULK in usr.mutations))//Don't want to do a lot of logic gating here.
usr << "\red You attempt to break your handcuffs. (This will take around 5 seconds and you need to stand still)"
@@ -764,7 +764,7 @@
CM.handcuffed = null
CM.update_inv_handcuffed()
else if(CM.legcuffed && CM.canmove && (CM.last_special <= world.time))
CM.next_move = world.time + 100
CM.delay_click(100)
CM.last_special = world.time + 100
if(isalienadult(CM) || (HULK in usr.mutations))//Don't want to do a lot of logic gating here.
usr << "\red You attempt to break your legcuffs. (This will take around 5 seconds and you need to stand still)"
+1 -1
View File
@@ -131,7 +131,7 @@
in_chamber.loc = get_turf(user)
in_chamber.starting = get_turf(user)
in_chamber.shot_from = src
user.next_move = world.time + 4
usr.delay_click(4)
in_chamber.silenced = silenced
in_chamber.current = curloc
in_chamber.yo = targloc.y - curloc.y