mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 20:15:47 +01:00
Merge pull request #4327 from Aranclanos/clickcooldowndefine
Defines for click cooldown numbers and click cooldown for paper camera spam.
This commit is contained in:
@@ -30,3 +30,8 @@
|
||||
|
||||
#define MINERAL_MATERIAL_AMOUNT 2000
|
||||
//The amount of materials you get from a sheet of mineral like iron/diamond/glass etc
|
||||
|
||||
|
||||
#define CLICK_CD_MELEE 8
|
||||
#define CLICK_CD_RANGE 4
|
||||
//click cooldowns, in tenths of a second
|
||||
@@ -102,7 +102,7 @@
|
||||
W.afterattack(A,src,1,params) // 1 indicates adjacency
|
||||
else
|
||||
if(ismob(A))
|
||||
changeNext_move(8)
|
||||
changeNext_move(CLICK_CD_MELEE)
|
||||
UnarmedAttack(A)
|
||||
return
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
W.afterattack(A,src,1,params) // 1: clicking something Adjacent
|
||||
else
|
||||
if(ismob(A))
|
||||
changeNext_move(8)
|
||||
changeNext_move(CLICK_CD_MELEE)
|
||||
UnarmedAttack(A, 1)
|
||||
return
|
||||
else // non-adjacent click
|
||||
@@ -150,7 +150,7 @@
|
||||
*/
|
||||
/mob/proc/UnarmedAttack(var/atom/A, var/proximity_flag)
|
||||
if(ismob(A))
|
||||
changeNext_move(8)
|
||||
changeNext_move(CLICK_CD_MELEE)
|
||||
return
|
||||
|
||||
/*
|
||||
@@ -261,7 +261,7 @@
|
||||
return
|
||||
|
||||
/mob/living/LaserEyes(atom/A)
|
||||
changeNext_move(4)
|
||||
changeNext_move(CLICK_CD_RANGE)
|
||||
var/turf/T = get_turf(src)
|
||||
var/turf/U = get_turf(A)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
visible_message("<span class='danger'>[src] has been hit by [user] with [W].</span>")
|
||||
|
||||
/mob/living/attackby(obj/item/I, mob/user)
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
I.attack(src, user)
|
||||
|
||||
/mob/living/proc/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone)
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
|
||||
|
||||
/obj/effect/blob/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1)
|
||||
src.visible_message("<span class='danger'>The [src.name] has been attacked with \the [W][(user ? " by [user]" : "")]!</span>")
|
||||
var/damage = 0
|
||||
@@ -167,7 +167,7 @@
|
||||
return
|
||||
|
||||
/obj/effect/blob/attack_animal(mob/living/simple_animal/M as mob)
|
||||
M.changeNext_move(8)
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1)
|
||||
src.visible_message("<span class='danger'>The [src.name] has been attacked by \the [M]!</span>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/bot/attack_alien(var/mob/living/carbon/alien/user as mob)
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
src.health -= rand(15,30)*brute_dam_coeff
|
||||
src.visible_message("\red <B>[user] has slashed [src]!</B>")
|
||||
playsound(src.loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
/obj/machinery/bot/attack_animal(var/mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0) return
|
||||
M.changeNext_move(8)
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
src.health -= M.melee_damage_upper
|
||||
src.visible_message("\red <B>[M] has [M.attacktext] [src]!</B>")
|
||||
add_logs(M, src, "attacked", admin=0)
|
||||
@@ -93,7 +93,7 @@
|
||||
Emag(user)
|
||||
else
|
||||
if(hasvar(W,"force") && hasvar(W,"damtype"))
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
switch(W.damtype)
|
||||
if("fire")
|
||||
src.health -= W.force * fire_dam_coeff
|
||||
|
||||
@@ -190,6 +190,7 @@
|
||||
itemname = P.name
|
||||
info = P.notehtml
|
||||
U << "You hold \the [itemname] up to the camera ..."
|
||||
U.changeNext_move(CLICK_CD_MELEE)
|
||||
for(var/mob/O in player_list)
|
||||
if(istype(O, /mob/living/silicon/ai))
|
||||
var/mob/living/silicon/ai/AI = O
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
/obj/machinery/door/window/proc/attack_generic(mob/user as mob, damage = 0)
|
||||
if(src.operating)
|
||||
return
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
user.visible_message("<span class='danger'>[user] smashes against the [src.name].</span>", \
|
||||
"<span class='userdanger'>[user] smashes against the [src.name].</span>")
|
||||
@@ -263,7 +263,7 @@
|
||||
|
||||
//If it's a weapon, smash windoor. Unless it's an id card, agent card, ect.. then ignore it (Cards really shouldnt damage a door anyway)
|
||||
if(src.density && istype(I, /obj/item/weapon) && !istype(I, /obj/item/weapon/card) )
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/aforce = I.force
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
visible_message("<span class='danger'>\The [src] has been hit by [user] with [I].</span>")
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
|
||||
else
|
||||
//if the turret was attacked with the intention of harming it:
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
health -= I.force * 0.5
|
||||
if(health <= 0)
|
||||
die()
|
||||
@@ -985,7 +985,7 @@ Status: []<BR>"},
|
||||
user << "<span class='notice'>Access denied.</span>"
|
||||
|
||||
else
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
Parent_Turret.health -= I.force * 0.5
|
||||
if(Parent_Turret.health <= 0)
|
||||
Parent_Turret.die()
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
|
||||
/obj/machinery/turret/attackby(obj/item/weapon/W, mob/user)//I can't believe no one added this before/N
|
||||
..()
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
playsound(src.loc, 'sound/weapons/smash.ogg', 60, 1)
|
||||
src.spark_system.start()
|
||||
src.health -= W.force * 0.5
|
||||
@@ -410,7 +410,7 @@
|
||||
|
||||
|
||||
/obj/machinery/turret/attack_animal(mob/living/simple_animal/M as mob)
|
||||
M.changeNext_move(8)
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
if(M.melee_damage_upper == 0) return
|
||||
if(!(stat & BROKEN))
|
||||
visible_message("\red <B>[M] [M.attacktext] [src]!</B>")
|
||||
@@ -427,7 +427,7 @@
|
||||
|
||||
|
||||
/obj/machinery/turret/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
M.changeNext_move(8)
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
if(!(stat & BROKEN))
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||
visible_message("\red <B>[] has slashed at []!</B>", M, src)
|
||||
@@ -548,7 +548,7 @@
|
||||
|
||||
|
||||
/obj/machinery/gun_turret/attack_alien(mob/user as mob)
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("[user] slashes at [src]", "You slash at [src]")
|
||||
take_damage(15)
|
||||
return
|
||||
|
||||
@@ -465,7 +465,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/mecha/attack_hand(mob/user as mob)
|
||||
user.changeNext_move(8) // Ugh. Ideally we shouldn't be setting cooldowns outside of click code.
|
||||
user.changeNext_move(CLICK_CD_MELEE) // Ugh. Ideally we shouldn't be setting cooldowns outside of click code.
|
||||
src.log_message("Attack by hand/paw. Attacker - [user].",1)
|
||||
|
||||
if ((HULK in user.mutations) && !prob(src.deflect_chance))
|
||||
@@ -633,7 +633,7 @@
|
||||
return
|
||||
|
||||
/obj/mecha/proc/dynattackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
user.changeNext_move(8) // Ugh. Ideally we shouldn't be setting cooldowns outside of click code.
|
||||
user.changeNext_move(CLICK_CD_MELEE) // Ugh. Ideally we shouldn't be setting cooldowns outside of click code.
|
||||
|
||||
src.log_message("Attacked by [W]. Attacker - [user]")
|
||||
if(prob(src.deflect_chance))
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
|
||||
|
||||
/obj/structure/alien/resin/attack_alien(mob/user)
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(islarva(user))
|
||||
return
|
||||
user.visible_message("<span class='danger'>[user] claws at the resin!</span>")
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
|
||||
/obj/structure/alien/resin/attackby(obj/item/I, mob/user)
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
health -= I.force
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
healthcheck()
|
||||
@@ -198,7 +198,7 @@
|
||||
|
||||
|
||||
/obj/structure/alien/weeds/attackby(obj/item/I, mob/user)
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(I.attack_verb.len)
|
||||
visible_message("<span class='danger'>[src] has been [pick(I.attack_verb)] with [I] by [user].</span>")
|
||||
else
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
update_icon()
|
||||
return
|
||||
else if(istype(O, /obj/item/weapon))
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/obj/item/weapon/W = O
|
||||
if(src.smashed || src.localopened)
|
||||
if(localopened)
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
|
||||
/obj/structure/displaycase/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
src.health -= W.force
|
||||
src.healthcheck()
|
||||
..()
|
||||
@@ -76,7 +76,7 @@
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/structure/displaycase/attack_hand(mob/user as mob)
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if (src.destroyed && src.occupied)
|
||||
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
|
||||
user << "\b You deactivate the hover field built into the case."
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/grille/attack_hand(mob/user as mob)
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
user.visible_message("<span class='warning'>[user] hits [src].</span>", \
|
||||
"<span class='warning'>You hit [src].</span>", \
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
/obj/structure/grille/attack_alien(mob/user as mob)
|
||||
if(istype(user, /mob/living/carbon/alien/larva)) return
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
user.visible_message("<span class='warning'>[user] mangles [src].</span>", \
|
||||
"<span class='warning'>You mangle [src].</span>", \
|
||||
@@ -54,7 +54,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/grille/attack_slime(mob/living/carbon/slime/user as mob)
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(!user.is_adult) return
|
||||
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
@@ -67,7 +67,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M as mob)
|
||||
M.changeNext_move(8)
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
if(M.melee_damage_upper == 0) return
|
||||
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
@@ -100,7 +100,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
if(!shock(user, 100))
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
|
||||
/obj/structure/lamarr/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
src.health -= W.force
|
||||
src.healthcheck()
|
||||
..()
|
||||
@@ -71,7 +71,7 @@
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/structure/lamarr/attack_hand(mob/user as mob)
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if (src.destroyed)
|
||||
return
|
||||
else
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
else
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("<span class='notice'>[user] knocks on [src].</span>")
|
||||
add_fingerprint(user)
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 50, 1)
|
||||
@@ -122,7 +122,7 @@
|
||||
/obj/structure/window/proc/attack_generic(mob/user as mob, damage = 0) //used by attack_alien, attack_animal, and attack_slime
|
||||
if(!can_be_reached(user))
|
||||
return
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
|
||||
@@ -191,7 +191,7 @@
|
||||
qdel(src)
|
||||
else
|
||||
if(I.damtype == BRUTE || I.damtype == BURN)
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
hit(I.force)
|
||||
if(health <= 7)
|
||||
anchored = 0
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
dismantle_wall()
|
||||
|
||||
/turf/simulated/wall/attack_paw(mob/user as mob)
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if ((HULK in user.mutations))
|
||||
if (prob(hardness))
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
|
||||
@@ -109,7 +109,7 @@
|
||||
return src.attack_hand(user)
|
||||
|
||||
/turf/simulated/wall/attack_animal(var/mob/living/simple_animal/M)
|
||||
M.changeNext_move(8)
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
if(M.environment_smash >= 2)
|
||||
if(istype(src, /turf/simulated/wall/r_wall))
|
||||
if(M.environment_smash == 3)
|
||||
@@ -125,7 +125,7 @@
|
||||
return
|
||||
|
||||
/turf/simulated/wall/attack_hand(mob/user as mob)
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if (HULK in user.mutations)
|
||||
if (prob(hardness))
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
|
||||
@@ -145,7 +145,7 @@
|
||||
return
|
||||
|
||||
/turf/simulated/wall/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
|
||||
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
||||
return
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
|
||||
/obj/effect/spacevine/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (!W || !user || !W.type) return
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
|
||||
var/override = 0
|
||||
|
||||
|
||||
@@ -398,7 +398,7 @@
|
||||
if(istype(O, /obj/item/weapon/kitchenknife) || istype(O, /obj/item/weapon/butch))
|
||||
harvest()
|
||||
else
|
||||
user.changeNext_move(8)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(O.force)
|
||||
if(O.force >= force_threshold)
|
||||
var/damage = O.force
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
return 0
|
||||
if(i > 1)
|
||||
newshot()
|
||||
user.changeNext_move(4)
|
||||
user.changeNext_move(CLICK_CD_RANGE)
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
qdel(D)
|
||||
|
||||
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
|
||||
user.changeNext_move(4)
|
||||
user.changeNext_move(CLICK_CD_RANGE)
|
||||
|
||||
if(reagents.has_reagent("sacid"))
|
||||
message_admins("[key_name_admin(user)] fired sulphuric acid from \a [src].")
|
||||
@@ -217,7 +217,7 @@
|
||||
qdel(D)
|
||||
|
||||
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
|
||||
user.changeNext_move(4)
|
||||
user.changeNext_move(CLICK_CD_RANGE)
|
||||
|
||||
if(reagents.has_reagent("sacid"))
|
||||
message_admins("[key_name_admin(user)] fired sulphuric acid from a chem sprayer.")
|
||||
|
||||
Reference in New Issue
Block a user