mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-15 17:15:25 +01:00
Removes click cooldowns almost everywhere.
Still have: doors, windoors, cameras, windows, grilles, blobs, resisting, alien stuff, mechas, spray bottles. Setting changeNextMove is now responsibility of the item being attacked. Adds a config option to eliminate click cooldowns completely. Intended to be used by devs.
This commit is contained in:
@@ -1311,9 +1311,10 @@
|
||||
set desc = "Pop a joint back into place. Extremely painful."
|
||||
set src in view(1)
|
||||
|
||||
if(!isliving(usr) || usr.next_move > world.time)
|
||||
if(!isliving(usr) || !usr.canClick())
|
||||
return
|
||||
usr.next_move = world.time + 20
|
||||
|
||||
usr.changeNextMove(20)
|
||||
|
||||
if(usr.stat > 0)
|
||||
usr << "You are unconcious and cannot do that!"
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
..()
|
||||
|
||||
/mob/living/carbon/proc/escape_handcuffs()
|
||||
if(!(last_special <= world.time)) return
|
||||
|
||||
next_move = world.time + 100
|
||||
last_special = world.time + 100
|
||||
if(!canClick())
|
||||
return
|
||||
|
||||
changeNextMove(100)
|
||||
|
||||
if(can_break_cuffs()) //Don't want to do a lot of logic gating here.
|
||||
break_handcuffs()
|
||||
@@ -61,10 +61,10 @@
|
||||
drop_from_inventory(handcuffed)
|
||||
|
||||
/mob/living/carbon/proc/escape_legcuffs()
|
||||
if(!(last_special <= world.time)) return
|
||||
|
||||
next_move = world.time + 100
|
||||
last_special = world.time + 100
|
||||
if(!canClick())
|
||||
return
|
||||
|
||||
changeNextMove(100)
|
||||
|
||||
if(can_break_cuffs()) //Don't want to do a lot of logic gating here.
|
||||
break_legcuffs()
|
||||
@@ -149,14 +149,15 @@
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/escape_buckle()
|
||||
if(!canClick())
|
||||
return
|
||||
|
||||
changeNextMove(100)
|
||||
if(!buckled) return
|
||||
if(!(last_special <= world.time)) return
|
||||
|
||||
if(!restrained())
|
||||
..()
|
||||
else
|
||||
next_move = world.time + 100
|
||||
last_special = world.time + 100
|
||||
visible_message(
|
||||
"<span class='danger'>[usr] attempts to unbuckle themself!</span>",
|
||||
"<span class='warning'>You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)</span>"
|
||||
|
||||
@@ -572,7 +572,7 @@ default behaviour is:
|
||||
set category = "IC"
|
||||
|
||||
if(can_resist())
|
||||
next_move = world.time + 20
|
||||
changeNextMove(20)
|
||||
process_resist()
|
||||
|
||||
/mob/living/proc/can_resist()
|
||||
@@ -580,7 +580,7 @@ default behaviour is:
|
||||
//so just check weakened instead.
|
||||
if(stat || weakened)
|
||||
return 0
|
||||
if(next_move > world.time)
|
||||
if(!canClick())
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -605,7 +605,7 @@ default behaviour is:
|
||||
|
||||
/mob/living/proc/escape_inventory(obj/item/weapon/holder/H)
|
||||
if(H != src.loc) return
|
||||
|
||||
|
||||
var/mob/M = H.loc //Get our mob holder (if any).
|
||||
|
||||
if(istype(M))
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
return
|
||||
|
||||
/mob/living/captive_brain/can_resist()
|
||||
return !(stat || next_move > world.time)
|
||||
return !(stat || !canClick())
|
||||
|
||||
/mob/living/captive_brain/process_resist()
|
||||
//Resisting control by an alien mind.
|
||||
|
||||
@@ -266,7 +266,6 @@
|
||||
|
||||
/mob/living/simple_animal/attackby(var/obj/item/O, var/mob/user)
|
||||
if(istype(O, /obj/item/stack/medical))
|
||||
user.changeNext_move(4)
|
||||
if(stat != DEAD)
|
||||
var/obj/item/stack/medical/MED = O
|
||||
if(health < maxHealth)
|
||||
@@ -284,7 +283,6 @@
|
||||
if(istype(O, /obj/item/weapon/kitchenknife) || istype(O, /obj/item/weapon/butch))
|
||||
harvest(user)
|
||||
else
|
||||
user.changeNext_move(8)
|
||||
if(O.force > resistance)
|
||||
var/damage = O.force
|
||||
if (O.damtype == HALLOSS)
|
||||
|
||||
@@ -241,8 +241,6 @@
|
||||
if (W)
|
||||
W.attack_self(src)
|
||||
update_inv_r_hand()
|
||||
if(next_move < world.time)
|
||||
next_move = world.time + 2
|
||||
return
|
||||
|
||||
/*
|
||||
@@ -945,9 +943,9 @@ mob/proc/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.canClick())
|
||||
return
|
||||
usr.next_move = world.time + 20
|
||||
usr.changeNextMove(20)
|
||||
|
||||
if(usr.stat == 1)
|
||||
usr << "You are unconcious and cannot do that!"
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
return
|
||||
if(state == GRAB_UPGRADING)
|
||||
return
|
||||
if(assailant.next_move > world.time)
|
||||
if(!assailant.canClick())
|
||||
return
|
||||
if(world.time < (last_upgrade + UPGRADE_COOLDOWN))
|
||||
return
|
||||
@@ -170,7 +170,7 @@
|
||||
assailant.attack_log += "\[[time_stamp()]\] <font color='red'>Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>"
|
||||
msg_admin_attack("[key_name(assailant)] strangled (kill intent) [key_name(affecting)]")
|
||||
|
||||
assailant.next_move = world.time + 10
|
||||
affecting.changeNextMove(10)
|
||||
affecting.losebreath += 1
|
||||
else
|
||||
assailant.visible_message("<span class='warning'>[assailant] was unable to tighten \his grip on [affecting]'s neck!</span>")
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
var/_move_delay = firemode.move_delay
|
||||
|
||||
var/shoot_time = (_burst - 1)*_burst_delay
|
||||
user.next_move = world.time + shoot_time //no clicking on things while shooting
|
||||
user.changeNextMove(shoot_time)
|
||||
if(user.client) user.client.move_delay = world.time + shoot_time //no moving while shooting either
|
||||
next_fire_time = world.time + shoot_time
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
update_held_icon()
|
||||
|
||||
//update timing
|
||||
user.next_move = world.time + 4
|
||||
user.changeNextMove(4)
|
||||
if(user.client) user.client.move_delay = world.time + _move_delay
|
||||
next_fire_time = world.time + _fire_delay
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
throw_speed = 2
|
||||
throw_range = 10
|
||||
force = 5.0
|
||||
flags = CONDUCT | USEDELAY
|
||||
flags = CONDUCT
|
||||
slot_flags = 0
|
||||
origin_tech = "combat=8;materials=5"
|
||||
fire_sound = 'sound/effects/bang.ogg'
|
||||
|
||||
@@ -50,6 +50,8 @@
|
||||
|
||||
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
|
||||
|
||||
user.changeNextMove(4)
|
||||
|
||||
if(reagents.has_reagent("sacid"))
|
||||
message_admins("[key_name_admin(user)] fired sulphuric acid from \a [src].")
|
||||
log_game("[key_name(user)] fired sulphuric acid from \a [src].")
|
||||
|
||||
Reference in New Issue
Block a user