This commit is contained in:
silicons
2020-07-18 18:51:16 -07:00
parent 1a040dd2a6
commit b1ccccb322
8 changed files with 13 additions and 22 deletions

View File

@@ -19,10 +19,6 @@
A.move_camera_by_click() A.move_camera_by_click()
/mob/living/silicon/ai/ClickOn(var/atom/A, params) /mob/living/silicon/ai/ClickOn(var/atom/A, params)
if(world.time <= next_click)
return
next_click = world.time + 1
if(!can_interact_with(A)) if(!can_interact_with(A))
return return

View File

@@ -34,10 +34,6 @@
* mob/RangedAttack(atom,params) - used only ranged, only used for tk and laser eyes but could be changed * mob/RangedAttack(atom,params) - used only ranged, only used for tk and laser eyes but could be changed
*/ */
/mob/proc/ClickOn( atom/A, params ) /mob/proc/ClickOn( atom/A, params )
if(world.time <= next_click)
return
next_click = world.time + world.tick_lag
if(check_click_intercept(params,A)) if(check_click_intercept(params,A))
return return
@@ -272,7 +268,6 @@
var/datum/antagonist/changeling/C = mind.has_antag_datum(/datum/antagonist/changeling) var/datum/antagonist/changeling/C = mind.has_antag_datum(/datum/antagonist/changeling)
if(C && C.chosen_sting) if(C && C.chosen_sting)
C.chosen_sting.try_to_sting(src,A) C.chosen_sting.try_to_sting(src,A)
next_click = world.time + 5
return return
swap_hand() swap_hand()
@@ -345,7 +340,6 @@
var/datum/antagonist/changeling/C = mind.has_antag_datum(/datum/antagonist/changeling) var/datum/antagonist/changeling/C = mind.has_antag_datum(/datum/antagonist/changeling)
if(C && C.chosen_sting) if(C && C.chosen_sting)
C.chosen_sting.try_to_sting(src,A) C.chosen_sting.try_to_sting(src,A)
next_click = world.time + 5
return return
..() ..()

View File

@@ -7,10 +7,6 @@
*/ */
/mob/living/silicon/robot/ClickOn(var/atom/A, var/params) /mob/living/silicon/robot/ClickOn(var/atom/A, var/params)
if(world.time <= next_click)
return
next_click = world.time + 1
if(check_click_intercept(params,A)) if(check_click_intercept(params,A))
return return
@@ -37,7 +33,7 @@
CtrlClickOn(A) CtrlClickOn(A)
return return
if(next_move >= world.time) if(!CheckActionCooldown())
return return
face_atom(A) // change direction to face what you clicked on face_atom(A) // change direction to face what you clicked on

View File

@@ -31,7 +31,8 @@
user.dna.add_mutation(XRAY) user.dna.add_mutation(XRAY)
user.dna.add_mutation(SPACEMUT) user.dna.add_mutation(SPACEMUT)
user.dna.add_mutation(TK) user.dna.add_mutation(TK)
user.next_move_modifier *= 0.5 //half the delay between attacks! user.last_action_mult *= 0.5
user.next_action_mult *= 0.5
to_chat(user, "Things around you feel slower!") to_chat(user, "Things around you feel slower!")
charges-- charges--
insisting = FALSE insisting = FALSE
@@ -101,7 +102,8 @@
to_chat(user, "[killreward] materializes into your hands!") to_chat(user, "[killreward] materializes into your hands!")
else else
to_chat(user, "[killreward] materializes onto the floor.") to_chat(user, "[killreward] materializes onto the floor.")
user.next_move_modifier *= 0.8 //20% less delay between attacks! user.last_action_mult *= 0.8 //20% less delay between attacks!
user.next_action_mult *= 0.8
to_chat(user, "Things around you feel slightly slower!") to_chat(user, "Things around you feel slightly slower!")
var/mob/living/simple_animal/hostile/venus_human_trap/killwish = new /mob/living/simple_animal/hostile/venus_human_trap(loc) var/mob/living/simple_animal/hostile/venus_human_trap/killwish = new /mob/living/simple_animal/hostile/venus_human_trap(loc)
killwish.maxHealth = 1500 killwish.maxHealth = 1500

View File

@@ -32,6 +32,6 @@
if(istype(I, /obj/item/gavelhammer)) if(istype(I, /obj/item/gavelhammer))
playsound(loc, 'sound/items/gavel.ogg', 100, 1) playsound(loc, 'sound/items/gavel.ogg', 100, 1)
user.visible_message("<span class='warning'>[user] strikes [src] with [I].</span>") user.visible_message("<span class='warning'>[user] strikes [src] with [I].</span>")
user.changeNext_move(CLICK_CD_MELEE) return TRUE
else else
return ..() return ..()

View File

@@ -30,6 +30,9 @@
var/move_delay = 0 var/move_delay = 0
var/area = null var/area = null
/// Last time we Click()ed. No clicking twice in one tick!
var/last_click = 0
/////////////// ///////////////
//SOUND STUFF// //SOUND STUFF//
/////////////// ///////////////

View File

@@ -772,6 +772,9 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
ip_intel = res.intel ip_intel = res.intel
/client/Click(atom/object, atom/location, control, params, ignore_spam = FALSE) /client/Click(atom/object, atom/location, control, params, ignore_spam = FALSE)
if(last_click > world.time - world.tick_lag)
return
last_click = world.time
var/ab = FALSE var/ab = FALSE
var/list/L = params2list(params) var/list/L = params2list(params)
if (object && object == middragatom && L["left"]) if (object && object == middragatom && L["left"])

View File

@@ -8,9 +8,6 @@
/mob /mob
// CLICKDELAY AND RELATED // CLICKDELAY AND RELATED
/// Last time we clicked. No clicking twice in one tick, please! This should be directly set and checked.
var/last_click = 0
/// Generic clickdelay variable. Marks down the last world.time we did something that should cause or impact generic clickdelay. This should be directly set or set using [DelayNextAction()]. This should only be checked using [CheckActionCooldown()]. /// Generic clickdelay variable. Marks down the last world.time we did something that should cause or impact generic clickdelay. This should be directly set or set using [DelayNextAction()]. This should only be checked using [CheckActionCooldown()].
var/last_action = 0 var/last_action = 0
/// Generic clickdelay variable. Next world.time we should be able to do something that respects generic clickdelay. This should be set using [DelayNextAction()] This should only be checked using [CheckActionCooldown()]. /// Generic clickdelay variable. Next world.time we should be able to do something that respects generic clickdelay. This should be set using [DelayNextAction()] This should only be checked using [CheckActionCooldown()].