mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 10:03:50 +01:00
One click queue system added, which affects gameplay completely.
Previously: After clicking on one thing, you could not click on another thing before 1 second had passed, and had to spam until 1 second had passed. Now: After one click, if there's a second click right after, it will be queued and executed automatically after the 1 second has passed. Tried to remove redundant DblClick() entries and changed them to QueueClick() where appropriate. Report for bugs. Updated change log. :-) git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1019 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -97,15 +97,15 @@
|
||||
largest_move_time = M.next_move - world.time
|
||||
else
|
||||
largest_move_time = 1
|
||||
if(M.lastDblClick >= largest_click_time)
|
||||
if(M.lastClick >= largest_click_time)
|
||||
largest_click_mob = M
|
||||
if(M.lastDblClick > world.time)
|
||||
largest_click_time = M.lastDblClick - world.time
|
||||
if(M.lastClick > world.time)
|
||||
largest_click_time = M.lastClick - world.time
|
||||
else
|
||||
largest_click_time = 0
|
||||
log_admin("DEBUG: [key_name(M)] next_move = [M.next_move] lastDblClick = [M.lastDblClick] world.time = [world.time]")
|
||||
log_admin("DEBUG: [key_name(M)] next_move = [M.next_move] lastClick = [M.lastClick] world.time = [world.time]")
|
||||
M.next_move = 1
|
||||
M.lastDblClick = 0
|
||||
M.lastClick = 0
|
||||
message_admins("[key_name_admin(largest_move_mob)] had the largest move delay with [largest_move_time] frames / [largest_move_time/10] seconds!", 1)
|
||||
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)
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
return
|
||||
if (emptyHand)
|
||||
usr.next_move = usr.prev_move
|
||||
usr:lastDblClick -= 3 //permit the double-click redirection to proceed.
|
||||
usr:lastClick -= 3 //permit the double-click redirection to proceed.
|
||||
switch(text)
|
||||
|
||||
//if emptyhand then wear the suit, no bedsheet clothes for the alien
|
||||
@@ -264,7 +264,7 @@
|
||||
if("o_clothing")
|
||||
if (src.wear_suit)
|
||||
if (emptyHand)
|
||||
src.wear_suit.DblClick()
|
||||
src.wear_suit.QueueClick()
|
||||
return
|
||||
if (( istype(W, /obj/alien/skin_suit) ))
|
||||
src.u_equip(W)
|
||||
@@ -280,7 +280,7 @@
|
||||
if("head")
|
||||
if (src.head)
|
||||
if (emptyHand)
|
||||
src.head.DblClick()
|
||||
src.head.QueueClick()
|
||||
return
|
||||
if (( istype(W, /obj/alien/head) ))
|
||||
src.u_equip(W)
|
||||
@@ -296,7 +296,7 @@
|
||||
if("storage1")
|
||||
if (src.l_store)
|
||||
if (emptyHand)
|
||||
src.l_store.DblClick()
|
||||
src.l_store.QueueClick()
|
||||
return
|
||||
if ((!( istype(W, /obj/item) ) || W.w_class > 3))
|
||||
return
|
||||
@@ -305,7 +305,7 @@
|
||||
if("storage2")
|
||||
if (src.r_store)
|
||||
if (emptyHand)
|
||||
src.r_store.DblClick()
|
||||
src.r_store.QueueClick()
|
||||
return
|
||||
if ((!( istype(W, /obj/item) ) || W.w_class > 3))
|
||||
return
|
||||
|
||||
@@ -89,8 +89,8 @@
|
||||
if(istype(src.equipped(), /obj/item/weapon/baton)) // add any other item paths you think are necessary
|
||||
if(src.loc:sd_lumcount < 3 || src.blinded)
|
||||
var/obj/item/weapon/W = src.equipped()
|
||||
if (world.time > src.lastDblClick+2)
|
||||
src.lastDblClick = world.time
|
||||
if (world.time > src.lastClick+2)
|
||||
src.lastClick = world.time
|
||||
if((prob(40)) || (prob(95) && src.mutations & 16))
|
||||
//src << "\red You accidentally stun yourself with the [W.name]."
|
||||
src.visible_message("\red [src] accidentally stun \himself with the [W.name].", \
|
||||
@@ -697,12 +697,12 @@
|
||||
return
|
||||
if (emptyHand)
|
||||
usr.next_move = usr.prev_move
|
||||
usr:lastDblClick -= 3 //permit the double-click redirection to proceed.
|
||||
usr:lastClick -= 3 //permit the double-click redirection to proceed.
|
||||
switch(text)
|
||||
if("mask")
|
||||
if (src.wear_mask)
|
||||
if (emptyHand)
|
||||
src.wear_mask.DblClick()
|
||||
src.wear_mask.QueueClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/clothing/mask) ))
|
||||
return
|
||||
@@ -712,7 +712,7 @@
|
||||
if("back")
|
||||
if (src.back)
|
||||
if (emptyHand)
|
||||
src.back.DblClick()
|
||||
src.back.QueueClick()
|
||||
return
|
||||
if (!istype(W, /obj/item))
|
||||
return
|
||||
@@ -725,7 +725,7 @@
|
||||
/* if("headset")
|
||||
if (src.ears)
|
||||
if (emptyHand)
|
||||
src.ears.DblClick()
|
||||
src.ears.QueueClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/device/radio/headset) ))
|
||||
return
|
||||
@@ -735,7 +735,7 @@
|
||||
if("o_clothing")
|
||||
if (src.wear_suit)
|
||||
if (emptyHand)
|
||||
src.wear_suit.DblClick()
|
||||
src.wear_suit.QueueClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/clothing/suit) ))
|
||||
return
|
||||
@@ -748,7 +748,7 @@
|
||||
if("gloves")
|
||||
if (src.gloves)
|
||||
if (emptyHand)
|
||||
src.gloves.DblClick()
|
||||
src.gloves.QueueClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/clothing/gloves) ))
|
||||
return
|
||||
@@ -758,7 +758,7 @@
|
||||
if("shoes")
|
||||
if (src.shoes)
|
||||
if (emptyHand)
|
||||
src.shoes.DblClick()
|
||||
src.shoes.QueueClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/clothing/shoes) ))
|
||||
return
|
||||
@@ -768,7 +768,7 @@
|
||||
if("belt")
|
||||
if (src.belt)
|
||||
if (emptyHand)
|
||||
src.belt.DblClick()
|
||||
src.belt.QueueClick()
|
||||
return
|
||||
if (!W || !W.flags || !( W.flags & ONBELT ))
|
||||
return
|
||||
@@ -778,7 +778,7 @@
|
||||
if("eyes")
|
||||
if (src.glasses)
|
||||
if (emptyHand)
|
||||
src.glasses.DblClick()
|
||||
src.glasses.QueueClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/clothing/glasses) ))
|
||||
return
|
||||
@@ -788,7 +788,7 @@
|
||||
if("head")
|
||||
if (src.head)
|
||||
if (emptyHand)
|
||||
src.head.DblClick()
|
||||
src.head.QueueClick()
|
||||
return
|
||||
if (( istype(W, /obj/item/weapon/paper) ))
|
||||
src.u_equip(W)
|
||||
@@ -801,7 +801,7 @@
|
||||
if("ears")
|
||||
if (src.ears)
|
||||
if (emptyHand)
|
||||
src.ears.DblClick()
|
||||
src.ears.QueueClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/clothing/ears) ) && !( istype(W, /obj/item/device/radio/headset) ))
|
||||
return
|
||||
@@ -811,7 +811,7 @@
|
||||
if("i_clothing")
|
||||
if (src.w_uniform)
|
||||
if (emptyHand)
|
||||
src.w_uniform.DblClick()
|
||||
src.w_uniform.QueueClick()
|
||||
return
|
||||
if (!( istype(W, /obj/item/clothing/under) ))
|
||||
return
|
||||
@@ -824,7 +824,7 @@
|
||||
if("id")
|
||||
if (src.wear_id)
|
||||
if (emptyHand)
|
||||
src.wear_id.DblClick()
|
||||
src.wear_id.QueueClick()
|
||||
return
|
||||
if (!src.w_uniform)
|
||||
return
|
||||
@@ -836,7 +836,7 @@
|
||||
if("storage1")
|
||||
if (src.l_store)
|
||||
if (emptyHand)
|
||||
src.l_store.DblClick()
|
||||
src.l_store.QueueClick()
|
||||
return
|
||||
if ((!( istype(W, /obj/item) ) || W.w_class > 2 || !( src.w_uniform )))
|
||||
return
|
||||
@@ -845,7 +845,7 @@
|
||||
if("storage2")
|
||||
if (src.r_store)
|
||||
if (emptyHand)
|
||||
src.r_store.DblClick()
|
||||
src.r_store.QueueClick()
|
||||
return
|
||||
if ((!( istype(W, /obj/item) ) || W.w_class > 2 || !( src.w_uniform )))
|
||||
return
|
||||
@@ -854,7 +854,7 @@
|
||||
if("suit storage")
|
||||
if (src.s_store)
|
||||
if (emptyHand)
|
||||
src.s_store.DblClick()
|
||||
src.s_store.QueueClick()
|
||||
return
|
||||
var/confirm
|
||||
if (src.wear_suit)
|
||||
@@ -875,7 +875,7 @@
|
||||
if("hat storage")
|
||||
if (src.h_store)
|
||||
if (emptyHand)
|
||||
src.h_store.DblClick()
|
||||
src.h_store.QueueClick()
|
||||
return
|
||||
var/confirm
|
||||
if (src.head)
|
||||
|
||||
@@ -935,7 +935,7 @@
|
||||
usr:module_active = null
|
||||
|
||||
else
|
||||
src.DblClick()
|
||||
src.QueueClick()
|
||||
return
|
||||
|
||||
/obj/screen/attack_hand(mob/user as mob, using)
|
||||
|
||||
Reference in New Issue
Block a user