Merge pull request #388 from Markolie/master

Remove click delay, standardize mutations, attack animations, attackby() params addition
This commit is contained in:
ZomgPonies
2015-02-23 12:47:25 -05:00
539 changed files with 1990 additions and 2130 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ Pipelines + Other Objects -> Pipe network
pipe_color = null
..()
/obj/machinery/atmospherics/attackby(atom/A, mob/user as mob)
/obj/machinery/atmospherics/attackby(atom/A, mob/user as mob, params)
if(istype(A, /obj/item/device/pipe_painter))
return
..()
+1 -1
View File
@@ -47,7 +47,7 @@
cell.emp_act(severity)
..(severity)
/obj/machinery/space_heater/air_conditioner/attackby(obj/item/I, mob/user)
/obj/machinery/space_heater/air_conditioner/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/stock_parts/cell))
if(open)
if(cell)
@@ -70,7 +70,7 @@
return 1
/obj/machinery/atmospherics/binary/circulator/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/atmospherics/binary/circulator/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/wrench))
anchored = !anchored
user << "\blue You [anchored ? "secure" : "unsecure"] the bolts holding [src] to the floor."
@@ -152,7 +152,7 @@
src.updateUsrDialog()
return
/obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (on)
@@ -184,7 +184,7 @@ Thus, the two variables affect pump operation are set in New():
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
@@ -171,7 +171,7 @@ Thus, the two variables affect pump operation are set in New():
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/binary/volume_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/binary/volume_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
@@ -70,7 +70,7 @@
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/omni/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/omni/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if(!istype(W, /obj/item/weapon/wrench))
return ..()
@@ -133,11 +133,11 @@
return null
/obj/machinery/atmospherics/portables_connector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/portables_connector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (connected_device)
user << "\red You cannot unwrench this [src], dettach [connected_device] first."
user << "\red You cannot unwrench this [src], detach [connected_device] first."
return 1
if (locate(/obj/machinery/portable_atmospherics, src.loc))
return 1
@@ -156,7 +156,7 @@ Filter types:
set_frequency(frequency)
..()
/obj/machinery/atmospherics/trinary/filter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/trinary/filter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
var/datum/gas_mixture/int_air = return_air()
@@ -114,7 +114,7 @@
return 1
/obj/machinery/atmospherics/trinary/mixer/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/trinary/mixer/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
var/datum/gas_mixture/int_air = return_air()
+1 -1
View File
@@ -358,7 +358,7 @@
else
go_to_side()
/obj/machinery/atmospherics/tvalve/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/tvalve/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (istype(src, /obj/machinery/atmospherics/tvalve/digital))
@@ -65,7 +65,7 @@
return 1
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
var/turf/T = src.loc
@@ -68,7 +68,7 @@
icon_state = "[prefix]off"
return
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
var/turf/T = src.loc
@@ -307,7 +307,7 @@
update_icon()
return
/obj/machinery/atmospherics/unary/vent_pump/attackby(obj/item/W, mob/user)
/obj/machinery/atmospherics/unary/vent_pump/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user))
@@ -343,7 +343,7 @@
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/unary/vent_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/unary/vent_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
@@ -276,7 +276,7 @@
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
+1 -1
View File
@@ -299,7 +299,7 @@
else
open()
/obj/machinery/atmospherics/valve/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/valve/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (istype(src, /obj/machinery/atmospherics/valve/digital) && src:frequency)
+2 -2
View File
@@ -62,7 +62,7 @@
..()
/obj/machinery/atmospherics/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (istype(src, /obj/machinery/atmospherics/pipe/tank))
return ..()
if (istype(src, /obj/machinery/atmospherics/pipe/vent))
@@ -1220,7 +1220,7 @@
return null
/obj/machinery/atmospherics/pipe/tank/attackby(var/obj/item/W as obj, var/mob/user as mob)
/obj/machinery/atmospherics/pipe/tank/attackby(var/obj/item/W as obj, var/mob/user as mob, params)
if(istype(W, /obj/item/device/pipe_painter))
return
-2
View File
@@ -15,7 +15,6 @@
return
if(control_disabled || stat) return
next_move = world.time + 9
if(ismob(A))
ai_actual_track(A)
@@ -60,7 +59,6 @@
if(world.time <= next_move)
return
next_move = world.time + 9
if(aiCamera.in_camera_mode)
aiCamera.camera_mode_off()
+20 -38
View File
@@ -77,6 +77,7 @@
return M.click_action(A,src)
if(restrained())
changeNext_move(CLICK_CD_HANDCUFFED) //Doing shit in cuffs shall be vey slow
RestrainedClickOn(A)
return
@@ -87,37 +88,26 @@
var/obj/item/W = get_active_hand()
if(W == A)
next_move = world.time + 6
if(W.flags&USEDELAY)
next_move += 5
W.attack_self(src)
if(hand)
update_inv_l_hand(0)
else
update_inv_r_hand(0)
return
// operate two STORAGE levels deep here (item in backpack in src; NOT item in box in backpack in src)
var/sdepth = A.storage_depth(src)
if(A == loc || (A in loc) || (sdepth != -1 && sdepth <= 1))
// faster access to objects already on you
if(A in contents)
next_move = world.time + 6 // on your person
else
next_move = world.time + 8 // in a box/bag or in your square
// No adjacency needed
if(W)
if(W.flags&USEDELAY)
next_move += 5
var/resolved = A.attackby(W,src)
if(!resolved && A && W)
W.afterattack(A,src,1,params) // 1 indicates adjacency
else
if(ismob(A))
changeNext_move(CLICK_CD_MELEE)
UnarmedAttack(A, 1)
return
if(!isturf(loc)) // This is going to stop you from telekinesing from inside a closet, but I don't shed many tears for that
@@ -126,19 +116,17 @@
// Allows you to click on a box's contents, if that box is on the ground, but no deeper than that
sdepth = A.storage_depth_turf()
if(isturf(A) || isturf(A.loc) || (sdepth != -1 && sdepth <= 1))
next_move = world.time + 10
if(A.Adjacent(src)) // see adjacent.dm
if(W)
if(W.flags&USEDELAY)
next_move += 5
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
var/resolved = A.attackby(W,src)
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example, params)
var/resolved = A.attackby(W,src,params)
if(!resolved && A && W)
W.afterattack(A,src,1,params) // 1: clicking something Adjacent
else
if(ismob(A))
changeNext_move(CLICK_CD_MELEE)
UnarmedAttack(A, 1)
return
else // non-adjacent click
if(W)
@@ -148,10 +136,12 @@
return
/mob/proc/changeNext_move(num)
next_move = world.time + num
// Default behavior: ignore double clicks, consider them normal clicks instead
/mob/proc/DblClickOn(var/atom/A, var/params)
ClickOn(A,params)
return
/*
Translates into attack_hand, etc.
@@ -164,6 +154,8 @@
in human click code to allow glove touches only at melee range.
*/
/mob/proc/UnarmedAttack(var/atom/A, var/proximity_flag)
if(ismob(A))
changeNext_move(CLICK_CD_MELEE)
return
/*
@@ -178,22 +170,12 @@
if(ishuman(src) && (istype(src:gloves, /obj/item/clothing/gloves/yellow/power)) && a_intent == "harm")
PowerGlove(A)
if(!mutations.len) return
if((M_LASER in mutations) && a_intent == "harm")
if((LASER in mutations) && a_intent == "harm")
LaserEyes(A) // moved into a proc below
return
else if(M_TK in mutations)
switch(get_dist(src,A))
if(0)
;
if(1 to 5) // not adjacent may mean blocked by window
next_move += 2
if(5 to 7)
next_move += 5
if(8 to tk_maxrange)
next_move += 10
else
return
A.attack_tk(src)
else
if(TK in mutations)
A.attack_tk(src)
/*
Restrained ClickOn
@@ -309,7 +291,7 @@
return
/mob/living/LaserEyes(atom/A)
next_move = world.time + 6
changeNext_move(CLICK_CD_RANGE)
var/turf/T = get_turf(src)
var/turf/U = get_turf(A)
+2 -15
View File
@@ -72,21 +72,13 @@
return
if(W == A)
next_move = world.time + 8
if(W.flags&USEDELAY)
next_move += 5
W.attack_self(src)
return
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc in contents)
if(A == loc || (A in loc) || (A in contents))
// No adjacency checks
next_move = world.time + 8
if(W.flags&USEDELAY)
next_move += 5
var/resolved = A.attackby(W,src)
var/resolved = A.attackby(W,src,params, params)
if(!resolved && A && W)
W.afterattack(A,src,1,params)
return
@@ -97,16 +89,11 @@
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc && isturf(A.loc.loc))
if(isturf(A) || isturf(A.loc))
if(A.Adjacent(src)) // see adjacent.dm
next_move = world.time + 10
if(W.flags&USEDELAY)
next_move += 5
var/resolved = A.attackby(W, src)
var/resolved = A.attackby(W, src, params, params)
if(!resolved && A && W)
W.afterattack(A, src, 1, params)
return
else
next_move = world.time + 10
W.afterattack(A, src, 0, params)
return
return
+2 -7
View File
@@ -52,7 +52,6 @@
return 1
if(usr.next_move >= world.time)
return
usr.next_move = world.time + 6
if(usr.stat || usr.restrained() || usr.stunned || usr.lying)
return 1
@@ -87,7 +86,7 @@
/obj/screen/storage
name = "storage"
/obj/screen/storage/Click()
/obj/screen/storage/Click(location, control, params)
if(world.time <= usr.next_move)
return 1
if(usr.stat || usr.paralysis || usr.stunned || usr.weakened)
@@ -97,8 +96,7 @@
if(master)
var/obj/item/I = usr.get_active_hand()
if(I)
master.attackby(I, usr)
usr.next_move = world.time+2
master.attackby(I, usr, params, params)
return 1
/obj/screen/gun
@@ -583,12 +581,10 @@
if(iscarbon(usr))
var/mob/living/carbon/C = usr
C.activate_hand("r")
usr.next_move = world.time+2
if("l_hand")
if(iscarbon(usr))
var/mob/living/carbon/C = usr
C.activate_hand("l")
usr.next_move = world.time+2
if("swap")
usr:swap_hand()
if("hand")
@@ -597,5 +593,4 @@
if(usr.attack_ui(slot_id))
usr.update_inv_l_hand(0)
usr.update_inv_r_hand(0)
usr.next_move = world.time+6
return 1
+9 -5
View File
@@ -4,13 +4,16 @@
return
// No comment
/atom/proc/attackby(obj/item/W, mob/user)
/atom/proc/attackby(obj/item/W, mob/living/user, params)
return
/atom/movable/attackby(obj/item/W, mob/user)
/atom/movable/attackby(obj/item/W, mob/living/user, params)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
if(!(W.flags&NOBLUDGEON))
visible_message("<span class='danger'>[src] has been hit by [user] with [W].</span>")
/mob/living/attackby(obj/item/I, mob/user)
/mob/living/attackby(obj/item/I, mob/user, params)
user.changeNext_move(CLICK_CD_MELEE)
if(istype(I) && ismob(user))
I.attack(src, user)
@@ -50,7 +53,7 @@
/////////////////////////
var/power = force
if(M_HULK in user.mutations)
if(HULK in user.mutations)
power *= 2
if(!istype(M, /mob/living/carbon/human))
@@ -128,6 +131,7 @@
var/showname = "."
if(user)
showname = " by [user]."
user.do_attack_animation(src)
if(!(user in viewers(M, null)))
showname = "."
@@ -159,7 +163,7 @@
if (istype(location, /turf/simulated))
location:add_blood_floor(M)
if("fire")
if (!(M_RESIST_COLD in M.mutations))
if (!(RESIST_COLD in M.mutations))
M.take_organ_damage(0, power)
M << "Aargh it burns!"
M.updatehealth()
+2 -2
View File
@@ -19,8 +19,8 @@
if(client.buildmode)
build_click(src, client.buildmode, params, A)
return
if(world.time <= next_move) return
next_move = world.time + 8
if(world.time <= next_move)
return
var/list/modifiers = params2list(params)
if(modifiers["shift"])
+4 -4
View File
@@ -270,7 +270,7 @@
// ------- YOU HAVE AN ITEM IN YOUR HAND - HANDLE ATTACKBY AND AFTERATTACK -------
var/ignoreAA = 0 //Ignore afterattack(). Surgery uses this.
if (t5)
ignoreAA = src.attackby(W, usr)
ignoreAA = src.attackby(W, usr, params)
if (W && !ignoreAA)
W.afterattack(src, usr, (t5 ? 1 : 0), params)
@@ -326,7 +326,7 @@
// ------- YOU ARE NOT RESTRAINED -------
if ((W && !( istype(src, /obj/screen) )))
// ------- IT SHOULD NEVER GET TO HERE, DUE TO THE ISTYPE(SRC, /OBJ/SCREEN) FROM PREVIOUS IF-S - I TESTED IT WITH A DEBUG OUTPUT AND I COULDN'T GET THIST TO SHOW UP. -------
src.attackby(W, usr)
src.attackby(W, usr, params)
if (W)
W.afterattack(src, usr,, params)
else
@@ -347,8 +347,8 @@
src.hand_al(usr, usr.hand)
else
// ------- YOU ARE CLICKING ON AN OBJECT THAT'S INACCESSIBLE TO YOU AND IS NOT YOUR HUD -------
if((M_LASER in usr:mutations) && usr:a_intent == "harm" && world.time >= usr.next_move)
// ------- YOU HAVE THE M_LASER MUTATION, YOUR INTENT SET TO HURT AND IT'S BEEN MORE THAN A DECISECOND SINCE YOU LAS TATTACKED -------
if((LASER in usr:mutations) && usr:a_intent == "harm" && world.time >= usr.next_move)
// ------- YOU HAVE THE LASER MUTATION, YOUR INTENT SET TO HURT AND IT'S BEEN MORE THAN A DECISECOND SINCE YOU LAS TATTACKED -------
var/turf/T = get_turf(usr)
var/turf/U = get_turf(src)
+3 -12
View File
@@ -30,22 +30,13 @@
/mob/living/carbon/human/RangedAttack(var/atom/A)
if(!gloves && !mutations.len) return
var/obj/item/clothing/gloves/G = gloves
if((M_LASER in mutations) && a_intent == "harm")
if((LASER in mutations) && a_intent == "harm")
LaserEyes(A) // moved into a proc below
else if(istype(G) && G.Touch(A,0)) // for magic gloves
return
else if(M_TK in mutations)
switch(get_dist(src,A))
if(1 to 5) // not adjacent may mean blocked by window
next_move += 2
if(5 to 7)
next_move += 5
if(8 to 15)
next_move += 10
if(16 to 128)
return
else if(TK in mutations)
A.attack_tk(src)
*/
@@ -78,7 +69,7 @@
if(..())
return
if(a_intent != "harm" || !ismob(A)) return
if(istype(wear_mask, /obj/item/clothing/mask/muzzle))
if(is_muzzled())
return
var/mob/living/carbon/ML = A
var/dam_zone = ran_zone(pick("chest", "l_hand", "r_hand", "l_leg", "r_leg"))
+12 -21
View File
@@ -39,13 +39,13 @@ var/const/tk_maxrange = 15
/obj/item/attack_tk(mob/user)
if(user.stat || !isturf(loc)) return
if((M_TK in user.mutations) && !user.get_active_hand()) // both should already be true to get here
if((TK in user.mutations) && !user.get_active_hand()) // both should already be true to get here
var/obj/item/tk_grab/O = new(src)
user.put_in_active_hand(O)
O.host = user
O.focus_object(src)
else
warning("Strange attack_tk(): TK([M_TK in user.mutations]) empty hand([!user.get_active_hand()])")
warning("Strange attack_tk(): TK([TK in user.mutations]) empty hand([!user.get_active_hand()])")
return
@@ -56,7 +56,7 @@ var/const/tk_maxrange = 15
TK Grab Item (the workhorse of old TK)
* If you have not grabbed something, do a normal tk attack
* If you have something, throw it at the target. If it is already adjacent, do a normal attackby()
* If you have something, throw it at the target. If it is already adjacent, do a normal attackby(, params)
* If you click what you are holding, or attack_self(), do an attack_self_tk() on it.
* Deletes itself if it is ever not in your hand, or if you should have no access to TK.
*/
@@ -95,33 +95,24 @@ var/const/tk_maxrange = 15
if(focus)
focus.attack_self_tk(user)
afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity)//TODO: go over this
afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity, params)//TODO: go over this
if(!target || !user) return
if(last_throw+3 > world.time) return
if(!host || host != user)
del(src)
return
if(!(M_TK in host.mutations))
if(!(TK in host.mutations))
del(src)
return
if(isobj(target) && !isturf(target.loc))
return
var/d = get_dist(user, target)
if(focus) d = max(d,get_dist(user,focus)) // whichever is further
switch(d)
if(0)
;
if(1 to 5) // not adjacent may mean blocked by window
if(!proximity)
user.next_move += 2
if(5 to 7)
user.next_move += 5
if(8 to tk_maxrange)
user.next_move += 10
else
user << "\blue Your mind won't reach that far."
return
if(focus)
d = max(d,get_dist(user,focus)) // whichever is further
if(d > tk_maxrange)
user << "<span class='warning'>Your mind won't reach that far.</span>"
return
if(!focus)
focus_object(target, user)
@@ -134,7 +125,7 @@ var/const/tk_maxrange = 15
if(!istype(target, /turf) && istype(focus,/obj/item) && target.Adjacent(focus))
var/obj/item/I = focus
var/resolved = target.attackby(I, user, user:get_organ_target())
var/resolved = target.attackby(I, user, params)
if(!resolved && target && I)
I.afterattack(target,user,1) // for splashing with beakers
@@ -198,7 +189,7 @@ var/const/tk_maxrange = 15
//equip_to_slot_or_del(obj/item/W, slot, del_on_fail = 1)
/*
if(istype(user, /mob/living/carbon))
if(user:mutations & M_TK && get_dist(source, user) <= 7)
if(user:mutations & TK && get_dist(source, user) <= 7)
if(user:get_active_hand()) return 0
var/X = source:x
var/Y = source:y
+14 -14
View File
@@ -48,7 +48,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
var/icon_power_button
var/power_button_name
/obj/effect/proc_holder/spell/wizard/proc/cast_check(skipcharge = 0, mob/user = usr) //checks if the spell can be cast based on its settings; skipcharge is used when an additional cast_check is called inside the spell
/obj/effect/proc_holder/spell/wizard/proc/cast_check(skipcharge = 0, mob/living/user = usr) //checks if the spell can be cast based on its settings; skipcharge is used when an additional cast_check is called inside the spell
if(!(src in user.spell_list))
user << "<span class='warning'>You shouldn't have this spell! Something's wrong.</span>"
@@ -75,27 +75,27 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
return 0
if(!ghost)
if(usr.stat && !stat_allowed)
usr << "Not when you're incapacitated."
if(user.stat && !stat_allowed)
user << "Not when you're incapacitated."
return 0
if(ishuman(usr) || ismonkey(usr))
if(istype(usr.wear_mask, /obj/item/clothing/mask/muzzle))
usr << "Mmmf mrrfff!"
if(ishuman(user) || ismonkey(user))
if(user.is_muzzled())
user << "Mmmf mrrfff!"
return 0
var/obj/effect/proc_holder/spell/wizard/noclothes/spell = locate() in user.spell_list
if(clothes_req && !(spell && istype(spell)))//clothes check
if(!istype(usr, /mob/living/carbon/human))
usr << "You aren't a human, Why are you trying to cast a human spell, silly non-human? Casting human spells is for humans."
if(!istype(user, /mob/living/carbon/human))
user << "You aren't a human, Why are you trying to cast a human spell, silly non-human? Casting human spells is for humans."
return 0
if(!istype(usr:wear_suit, /obj/item/clothing/suit/wizrobe) && !istype(user:wear_suit, /obj/item/clothing/suit/space/rig/wizard))
usr << "I don't feel strong enough without my robe."
if(!istype(user:wear_suit, /obj/item/clothing/suit/wizrobe) && !istype(user:wear_suit, /obj/item/clothing/suit/space/rig/wizard))
user << "I don't feel strong enough without my robe."
return 0
if(!istype(usr:shoes, /obj/item/clothing/shoes/sandal))
usr << "I don't feel strong enough without my sandals."
if(!istype(user:shoes, /obj/item/clothing/shoes/sandal))
user << "I don't feel strong enough without my sandals."
return 0
if(!istype(usr:head, /obj/item/clothing/head/wizard) && !istype(usr:head, /obj/item/clothing/head/helmet/space/rig/wizard))
usr << "<span class='notice'>I don't feel strong enough without my hat.</span>"
if(!istype(user:head, /obj/item/clothing/head/wizard) && !istype(user:head, /obj/item/clothing/head/helmet/space/rig/wizard))
user << "<span class='notice'>I don't feel strong enough without my hat.</span>"
return 0
if(!skipcharge)
+1 -1
View File
@@ -20,7 +20,7 @@
for(var/mob/living/target in targets)
for(var/x in mutations)
target.mutations.Add(x)
if(x == M_HULK && ishuman(target))
if(x == HULK && ishuman(target))
target:hulk_time=world.time + duration
target.disabilities |= disabilities
target.update_mutations() //update target's mutation overlays
+1 -1
View File
@@ -48,7 +48,7 @@
include_user = 1
centcom_cancast = 0
mutations = list(M_LASER, M_HULK)
mutations = list(LASER, HULK)
duration = 300
cooldown_min = 300 //25 deciseconds reduction per rank
+2 -2
View File
@@ -4,7 +4,7 @@
anchored = 1
density = 1
attackby(obj/item/weapon/W as obj, mob/user as mob)
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
return attack_hand(user)
attack_hand(mob/user as mob)
@@ -19,7 +19,7 @@
anchored = 1
density = 0
attackby(obj/item/weapon/W as obj, mob/user as mob)
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
return attack_hand(user)
-1
View File
@@ -830,7 +830,6 @@
icon = 'icons/obj/lightning.dmi'
icon_state = "lightning"
desc = "test lightning"
flags = USEDELAY
New()
icon = midicon
+1 -1
View File
@@ -295,7 +295,7 @@ its easier to just keep the beam vertical.
add_fibers(M)
//He has no prints!
if (M_FINGERPRINTS in M.mutations)
if (FINGERPRINTS in M.mutations)
if(fingerprintslast != M.key)
fingerprintshidden += "(Has no fingerprints) Real name: [M.real_name], Key: [M.key]"
fingerprintslast = M.key
+3 -3
View File
@@ -108,7 +108,7 @@
src.throw_source = get_turf(src) //store the origin turf
if(usr)
if(M_HULK in usr.mutations)
if(HULK in usr.mutations)
src.throwing = 2 // really strong throw!
var/dist_x = abs(target.x - src.x)
@@ -207,9 +207,9 @@
verbs.Cut()
return
/atom/movable/overlay/attackby(a, b)
/atom/movable/overlay/attackby(a, b, c)
if (src.master)
return src.master.attackby(a, b)
return src.master.attackby(a, b, c)
return
/atom/movable/overlay/attack_paw(a, b, c)
+4 -4
View File
@@ -191,7 +191,7 @@
if(user.pulling == L)
user.pulling = null
/obj/machinery/dna_scannernew/attackby(var/obj/item/weapon/item as obj, var/mob/user as mob)
/obj/machinery/dna_scannernew/attackby(var/obj/item/weapon/item as obj, var/mob/user as mob, params)
if(istype(item, /obj/item/weapon/screwdriver))
if(occupant)
user << "<span class='notice'>The maintenance panel is locked.</span>"
@@ -338,7 +338,7 @@
active_power_usage = 400
var/waiting_for_user_input=0 // Fix for #274 (Mash create block injector without answering dialog to make unlimited injectors) - N3X
/obj/machinery/computer/scan_consolenew/attackby(obj/item/I as obj, mob/user as mob)
/obj/machinery/computer/scan_consolenew/attackby(obj/item/I as obj, mob/user as mob, params)
if (istype(I, /obj/item/weapon/disk/data)) //INSERT SOME diskS
if (!src.disk)
user.drop_item()
@@ -504,7 +504,7 @@
occupantData["name"] = connected.occupant.name
occupantData["stat"] = connected.occupant.stat
occupantData["isViableSubject"] = 1
if ((M_NOCLONE in connected.occupant.mutations && connected.scan_level < 3) || !src.connected.occupant.dna)
if ((NOCLONE in connected.occupant.mutations && connected.scan_level < 3) || !src.connected.occupant.dna)
occupantData["isViableSubject"] = 0
occupantData["health"] = connected.occupant.health
occupantData["maxHealth"] = connected.occupant.maxHealth
@@ -843,7 +843,7 @@
return 1
if (bufferOption == "transfer")
if (!src.connected.occupant || (M_NOCLONE in src.connected.occupant.mutations && connected.scan_level < 3) || !src.connected.occupant.dna)
if (!src.connected.occupant || (NOCLONE in src.connected.occupant.mutations && connected.scan_level < 3) || !src.connected.occupant.dna)
return
irradiating = 2
+3 -3
View File
@@ -55,7 +55,7 @@
name="Hallucinate"
activation_message="Your mind says 'Hello'."
deactivation_message ="Sanity returns. Or does it?"
mutation=M_HALLUCINATE
mutation=HALLUCINATE
New()
block=HALLUCINATIONBLOCK
@@ -82,7 +82,7 @@
name="Clumsiness"
activation_message="You feel lightheaded."
deactivation_message ="You regain some control of your movements"
mutation=M_CLUMSY
mutation=CLUMSY
New()
block=CLUMSYBLOCK
@@ -155,7 +155,7 @@
desc = "This will only bring death and destruction."
activation_message = "<span class='sans'>Uh oh!</span>"
deactivation_message = "Well thank god that's over with."
mutation=M_COMIC
mutation=COMIC
New()
block = COMICBLOCK
+3 -3
View File
@@ -57,7 +57,7 @@
activation_message = "You feel blubbery and lethargic!"
deactivation_message = "You feel fit!"
mutation = M_OBESITY
mutation = OBESITY
New()
..()
@@ -219,7 +219,7 @@
deactivation_message = "Your stomach stops acting up. Phew!"
instability=2
mutation = M_TOXIC_FARTS
mutation = TOXIC_FARTS
New()
..()
@@ -237,7 +237,7 @@
activation_message = "You feel buff!"
deactivation_message = "You feel wimpy and weak."
mutation = M_STRONG
mutation = STRONG
New()
..()
+8 -8
View File
@@ -6,7 +6,7 @@
activation_messages=list("You feel unusually sober.")
deactivation_messages = list("You feel like you could use a stiff drink.")
mutation=M_SOBER
mutation=SOBER
New()
block=SOBERBLOCK
@@ -19,7 +19,7 @@
deactivation_messages = list("You feel oddly exposed.")
instability=2
mutation=M_PSY_RESIST
mutation=PSY_RESIST
New()
block=PSYRESISTBLOCK
@@ -149,7 +149,7 @@
usr << "\red This will only work on normal organic beings."
return
if (M_RESIST_COLD in C.mutations)
if (RESIST_COLD in C.mutations)
C.visible_message("\red A cloud of fine ice crystals engulfs [C.name], but disappears almost instantly!")
return
var/handle_suit = 0
@@ -392,7 +392,7 @@
else usr.pixel_y -= 8
sleep(1)
if (M_FAT in usr.mutations && prob(66))
if (FAT in usr.mutations && prob(66))
usr.visible_message("\red <b>[usr.name]</b> crashes due to their heavy weight!")
//playsound(usr.loc, 'zhit.wav', 50, 1)
usr.weakened += 10
@@ -481,7 +481,7 @@
activation_messages = list("You suddenly notice more about others than you did before.")
deactivation_messages = list("You no longer feel able to sense intentions.")
instability=1
mutation=M_EMPATH
mutation=EMPATH
New()
..()
@@ -514,7 +514,7 @@
usr << "\red You may only use this on other organic beings."
return
if (M_PSY_RESIST in M.mutations)
if (PSY_RESIST in M.mutations)
usr << "\red You can't see into [M.name]'s mind at all!"
return
@@ -578,7 +578,7 @@
usr << "\blue <b>Numbers</b>: You sense the number[numbers.len>1?"s":""] [english_list(numbers)] [numbers.len>1?"are":"is"] important to [M.name]."
usr << "\blue <b>Thoughts</b>: [M.name] is currently [thoughts]."
if (M_EMPATH in M.mutations)
if (EMPATH in M.mutations)
M << "\red You sense [usr.name] reading your mind."
else if (prob(5) || M.mind.assigned_role=="Chaplain")
M << "\red You sense someone intruding upon your thoughts..."
@@ -594,7 +594,7 @@
deactivation_messages = list("You no longer feel gassy. What a relief!")
instability=1
mutation = M_SUPER_FART
mutation = SUPER_FART
New()
..()
+13 -13
View File
@@ -5,7 +5,7 @@
/datum/dna/gene/basic/nobreath
name="No Breathing"
activation_messages=list("You feel no need to breathe.")
mutation=M_NO_BREATH
mutation=NO_BREATH
instability=2
New()
@@ -15,7 +15,7 @@
/datum/dna/gene/basic/regenerate
name="Regenerate"
activation_messages=list("You feel better.")
mutation=M_REGEN
mutation=REGEN
instability=2
New()
@@ -24,7 +24,7 @@
/datum/dna/gene/basic/increaserun
name="Super Speed"
activation_messages=list("Your leg muscles pulsate.")
mutation=M_RUN
mutation=RUN
instability=1
New()
@@ -34,7 +34,7 @@
/datum/dna/gene/basic/heat_resist
name="Heat Resistance"
activation_messages=list("Your skin is icy to the touch.")
mutation=M_RESIST_HEAT
mutation=RESIST_HEAT
instability=2
New()
@@ -45,7 +45,7 @@
return !(/datum/dna/gene/basic/cold_resist in M.active_genes)
// Probability check
var/_prob = 15
if(M_RESIST_COLD in M.mutations)
if(RESIST_COLD in M.mutations)
_prob=5
if(probinj(_prob,(flags&MUTCHK_FORCED)))
return 1
@@ -56,7 +56,7 @@
/datum/dna/gene/basic/cold_resist
name="Cold Resistance"
activation_messages=list("Your body is filled with warmth.")
mutation=M_RESIST_COLD
mutation=RESIST_COLD
instability=2
New()
@@ -67,7 +67,7 @@
return !(/datum/dna/gene/basic/heat_resist in M.active_genes)
// Probability check
var/_prob=30
if(M_RESIST_HEAT in M.mutations)
if(RESIST_HEAT in M.mutations)
_prob=5
if(probinj(_prob,(flags&MUTCHK_FORCED)))
return 1
@@ -78,7 +78,7 @@
/datum/dna/gene/basic/noprints
name="No Prints"
activation_messages=list("Your fingers feel numb.")
mutation=M_FINGERPRINTS
mutation=FINGERPRINTS
instability=1
New()
@@ -87,7 +87,7 @@
/datum/dna/gene/basic/noshock
name="Shock Immunity"
activation_messages=list("Your skin feels strange.")
mutation=M_NO_SHOCK
mutation=NO_SHOCK
instability=2
New()
@@ -96,7 +96,7 @@
/datum/dna/gene/basic/midget
name="Midget"
activation_messages=list("Your skin feels rubbery.")
mutation=M_DWARF
mutation=DWARF
instability=1
New()
@@ -104,7 +104,7 @@
can_activate(var/mob/M,var/flags)
// Can't be big and small.
if(M_HULK in M.mutations)
if(HULK in M.mutations)
return 0
return ..(M,flags)
@@ -115,7 +115,7 @@
/datum/dna/gene/basic/xray
name="X-Ray Vision"
activation_messages=list("The walls suddenly disappear.")
mutation=M_XRAY
mutation=XRAY
instability=2
New()
@@ -124,7 +124,7 @@
/datum/dna/gene/basic/tk
name="Telekenesis"
activation_messages=list("You feel smarter.")
mutation=M_TK
mutation=TK
activation_prob=15
instability=5
+2 -2
View File
@@ -30,7 +30,7 @@
can_activate(var/mob/M,var/flags)
// No loud whispering.
if(M_LOUD in M.mutations)
if(LOUD in M.mutations)
return 0
return ..(M,flags)
@@ -51,5 +51,5 @@
OnMobLife(var/mob/living/carbon/human/M)
if(!istype(M)) return
if(M_DIZZY in M.mutations)
if(DIZZY in M.mutations)
M.Dizzy(300)
+11 -11
View File
@@ -26,12 +26,12 @@ Obviously, requires DNA2.
can_activate(var/mob/M,var/flags)
// Can't be big AND small.
if(M_DWARF in M.mutations)
if(DWARF in M.mutations)
return 0
return ..(M,flags)
OnDrawUnderlays(var/mob/M,var/g,var/fat)
if(M_HULK in M.mutations)
if(HULK in M.mutations)
if(fat)
return "hulk_[fat]_s"
else
@@ -40,11 +40,11 @@ Obviously, requires DNA2.
OnMobLife(var/mob/living/carbon/human/M)
if(!istype(M)) return
if(M_HULK in M.mutations)
if(HULK in M.mutations)
var/timeleft=M.hulk_time - world.time
if(M.health <= 25 || timeleft <= 0)
M.hulk_time=0 // Just to be sure.
M.mutations.Remove(M_HULK)
M.mutations.Remove(HULK)
//M.dna.SetSEState(HULKBLOCK,0)
M.update_mutations() //update our mutation overlays
M.update_body()
@@ -78,7 +78,7 @@ Obviously, requires DNA2.
return
var/mob/living/carbon/human/M=usr
M.hulk_time = world.time + HULK_DURATION
M.mutations.Add(M_HULK)
M.mutations.Add(HULK)
M.update_mutations() //update our mutation overlays
M.update_body()
//M.say(pick("",";")+pick("HULK MAD","YOU MADE HULK ANGRY")) // Just a note to security.
@@ -98,7 +98,7 @@ Obviously, requires DNA2.
deactivation_messages = list("You body feels normal.")
mutation=M_MORPH
mutation=MORPH
instability=2
New()
@@ -197,7 +197,7 @@ Obviously, requires DNA2.
/datum/dna/gene/basic/grant_spell/remotetalk
name="Telepathy"
activation_messages=list("You expand your mind outwards.")
mutation=M_REMOTE_TALK
mutation=REMOTE_TALK
instability=1
spelltype =/obj/effect/proc_holder/spell/wizard/targeted/remotetalk
@@ -244,7 +244,7 @@ Obviously, requires DNA2.
var/say = strip_html(input("What do you wish to say"))
for(var/mob/living/target in targets)
if(M_REMOTE_TALK in target.mutations)
if(REMOTE_TALK in target.mutations)
target.show_message("\blue You hear [usr.real_name]'s voice: [say]")
else
target.show_message("\blue You hear a voice that seems to echo around the room: [say]")
@@ -257,7 +257,7 @@ Obviously, requires DNA2.
/datum/dna/gene/basic/grant_spell/remoteview
name="Remote Viewing"
activation_messages=list("Your mind expands.")
mutation=M_REMOTE_VIEW
mutation=REMOTE_VIEW
instability=3
spelltype =/obj/effect/proc_holder/spell/wizard/targeted/remoteview
@@ -283,7 +283,7 @@ Obviously, requires DNA2.
var/list/targets = living_mob_list
var/list/remoteviewers = new /list()
for(var/mob/M in targets)
if(M_REMOTE_VIEW in M.mutations)
if(REMOTE_VIEW in M.mutations)
remoteviewers += M
if(!remoteviewers.len || remoteviewers.len == 1)
usr << "<span class='warning'>No valid targets with remote view were found!</span>"
@@ -316,7 +316,7 @@ Obviously, requires DNA2.
for(var/mob/living/L in targets)
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(M_PSY_RESIST in H.mutations)
if(PSY_RESIST in H.mutations)
continue
target = L
+16 -1
View File
@@ -129,7 +129,9 @@
return 0
attackby(var/obj/item/weapon/W, var/mob/user)
attackby(var/obj/item/weapon/W, var/mob/living/user, params)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
playsound(get_turf(src), 'sound/effects/attackblob.ogg', 50, 1)
src.visible_message("\red <B>The [src.name] has been attacked with \the [W][(user ? " by [user]." : ".")]")
var/damage = 0
@@ -144,6 +146,19 @@
health -= damage
update_icon()
return
attack_animal(mob/living/simple_animal/M as mob)
M.changeNext_move(CLICK_CD_MELEE)
M.do_attack_animation(src)
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)
if(!damage) // Avoid divide by zero errors
return
damage /= max(src.brute_resist, 1)
health -= damage
update_icon()
return
proc/change_to(var/type)
if(!ispath(type))
+2 -2
View File
@@ -148,7 +148,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
if (changeling.current.mind)
if (changeling.current.mind.assigned_role == "Clown")
changeling.current << "You have evolved beyond your clownish nature, allowing you to wield weapons without harming yourself."
changeling.current.mutations.Remove(M_CLUMSY)
changeling.current.mutations.Remove(CLUMSY)
var/obj_count = 1
for(var/datum/objective/objective in changeling.objectives)
@@ -294,7 +294,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
user << "<span class='warning'>[T] is not compatible with our biology.</span>"
return
if((M_NOCLONE || SKELETON || M_HUSK) in T.mutations)
if((NOCLONE || SKELETON || HUSK) in T.mutations)
user << "<span class='warning'>DNA of [target] is ruined beyond usability!</span>"
return
@@ -82,7 +82,7 @@
/obj/effect/proc_holder/changeling/sting/transformation/can_sting(var/mob/user, var/mob/target)
if(!..())
return
if((M_HUSK in target.mutations) || (!ishuman(target) && !ismonkey(target)))
if((HUSK in target.mutations) || (!ishuman(target) && !ismonkey(target)))
user << "<span class='warning'>Our sting appears ineffective against its DNA.</span>"
return 0
if(ishuman(target))
+1 -1
View File
@@ -132,7 +132,7 @@
if (mob.mind)
if (mob.mind.assigned_role == "Clown")
mob << "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself."
mob.mutations.Remove(M_CLUMSY)
mob.mutations.Remove(CLUMSY)
add_cult_viewpoint(mob) // give them a viewpoint
+2 -2
View File
@@ -92,7 +92,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
return
/obj/effect/rune/attackby(I as obj, user as mob)
/obj/effect/rune/attackby(I as obj, user as mob, params)
if(istype(I, /obj/item/weapon/tome) && iscultist(user))
user << "You retrace your steps, carefully undoing the lines of the rune."
del(src)
@@ -487,7 +487,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
user << "The book seems full of illegible scribbles. Is this a joke?"
return
attackby(obj/item/weapon/tome/T as obj, mob/living/user as mob)
attackby(obj/item/weapon/tome/T as obj, mob/living/user as mob, params)
if(istype(T, /obj/item/weapon/tome)) // sanity check to prevent a runtime error
switch(alert("Copy the runes from your tome?",,"Copy", "Cancel"))
if("cancel")
+2 -2
View File
@@ -1019,7 +1019,7 @@ var/list/sacrificed = list()
if(iscarbon(L))
var/mob/living/carbon/C = L
flick("e_flash", C.flash)
if(C.stuttering < 1 && (!(M_HULK in C.mutations)))
if(C.stuttering < 1 && (!(HULK in C.mutations)))
C.stuttering = 1
C.Weaken(1)
C.Stun(1)
@@ -1046,7 +1046,7 @@ var/list/sacrificed = list()
else if(iscarbon(T))
var/mob/living/carbon/C = T
flick("e_flash", C.flash)
if (!(M_HULK in C.mutations))
if (!(HULK in C.mutations))
C.silent += 15
C.Weaken(25)
C.Stun(25)
+1 -1
View File
@@ -20,7 +20,7 @@
master.growth_queue -= src
..()
/obj/effect/biomass/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/effect/biomass/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (!W || !user || !W.type) return
switch(W.type)
if(/obj/item/weapon/circular_saw) del src
+15 -14
View File
@@ -850,7 +850,7 @@ ________________________________________________________________________________
//=======//GENERAL SUIT PROCS//=======//
/obj/item/clothing/suit/space/space_ninja/attackby(obj/item/I, mob/U)
/obj/item/clothing/suit/space/space_ninja/attackby(obj/item/I, mob/U, params)
if(U==affecting)//Safety, in case you try doing this without wearing the suit/being the person with the suit.
if(istype(I, /obj/item/device/aicard))//If it's an AI card.
if(s_control)
@@ -1554,34 +1554,35 @@ It is possible to destroy the net by the occupant or someone else.
..()
return
attack_hand()
if (M_HULK in usr.mutations)
usr << text("\blue You easily destroy the energy net.")
attack_hand(mob/living/user)
if (HULK in user.mutations)
user << text("\blue You easily destroy the energy net.")
for(var/mob/O in oviewers(src))
O.show_message(text("\red [] rips the energy net apart!", usr), 1)
O.show_message(text("\red [] rips the energy net apart!", user), 1)
health-=50
healthcheck()
return
attack_paw()
return attack_hand()
attack_paw(mob/living/user)
return attack_hand(user)
attack_alien()
if (islarva(usr))
attack_alien(mob/living/user)
if (islarva(user))
return
usr << text("\green You claw at the net.")
user.do_attack_animation(src)
user << text("\green You claw at the net.")
for(var/mob/O in oviewers(src))
O.show_message(text("\red [] claws at the energy net!", usr), 1)
O.show_message(text("\red [] claws at the energy net!", user), 1)
playsound(get_turf(src), 'sound/weapons/slash.ogg', 80, 1)
health -= rand(10, 20)
if(health <= 0)
usr << text("\green You slice the energy net to pieces.")
user << text("\green You slice the energy net to pieces.")
for(var/mob/O in oviewers(src))
O.show_message(text("\red [] slices the energy net apart!", usr), 1)
O.show_message(text("\red [] slices the energy net apart!", user), 1)
healthcheck()
return
attackby(obj/item/weapon/W as obj, mob/user as mob)
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
var/aforce = W.force
health = max(0, health - aforce)
healthcheck()
+1 -1
View File
@@ -15,7 +15,7 @@ var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind'
required_players = 15
required_players_secret = 25
required_enemies = 4
recommended_enemies = 6
recommended_enemies = 5
votable = 0
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
+1 -1
View File
@@ -148,7 +148,7 @@
del(src)
return
/obj/effect/meteor/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/effect/meteor/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/pickaxe))
del(src)
return
@@ -75,7 +75,7 @@
// Impossible!
state("Command aborted. This unit is defective.")
/obj/machinery/emergency_authentication_device/attackby(obj/item/weapon/O, mob/user)
/obj/machinery/emergency_authentication_device/attackby(obj/item/weapon/O, mob/user, params)
if(activated)
user << "\blue \The [src] is already active!"
return
+1 -1
View File
@@ -20,7 +20,7 @@
/obj/item/flag/nation/light()
return
/obj/item/flag/nation/attackby(var/obj/item/weapon/W, var/mob/user)
/obj/item/flag/nation/attackby(var/obj/item/weapon/W, var/mob/user, params)
return
/obj/item/flag/nation/attack_paw()
+1 -1
View File
@@ -55,7 +55,7 @@ var/bomb_set
nanomanager.update_uis(src)
return
/obj/machinery/nuclearbomb/attackby(obj/item/weapon/O as obj, mob/user as mob)
/obj/machinery/nuclearbomb/attackby(obj/item/weapon/O as obj, mob/user as mob, params)
if (istype(O, /obj/item/weapon/screwdriver))
src.add_fingerprint(user)
if (src.auth)
+1 -1
View File
@@ -183,7 +183,7 @@
if (mob.mind)
if (mob.mind.assigned_role == "Clown")
mob << "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself."
mob.mutations.Remove(M_CLUMSY)
mob.mutations.Remove(CLUMSY)
var/obj/item/device/flash/T = new(mob)
+1 -1
View File
@@ -301,7 +301,7 @@
if (traitor_mob.mind)
if (traitor_mob.mind.assigned_role == "Clown")
traitor_mob << "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself."
traitor_mob.mutations.Remove(M_CLUMSY)
traitor_mob.mutations.Remove(CLUMSY)
// find a radio! toolbox(es), backpack, belt, headset
var/obj/item/R = locate(/obj/item/device/pda) in traitor_mob.contents //Hide the uplink in a PDA if available, otherwise radio
+1 -1
View File
@@ -193,7 +193,7 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
if (vampire.current.mind)
if (vampire.current.mind.assigned_role == "Clown")
vampire.current << "Your lust for blood has allowed you to overcome your clumsy nature allowing you to wield weapons without harming yourself."
vampire.current.mutations.Remove(M_CLUMSY)
vampire.current.mutations.Remove(CLUMSY)
var/obj_count = 1
for(var/datum/objective/objective in vampire.objectives)
+1 -1
View File
@@ -174,7 +174,7 @@
if(cowsleft <= 0)
del src
/obj/effect/rend/cow/attackby(obj/item/I as obj, mob/user as mob)
/obj/effect/rend/cow/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/weapon/nullrod))
visible_message("\red <b>[I] strikes a blow against \the [src], banishing it!</b>")
spawn(1)
+2 -2
View File
@@ -111,8 +111,8 @@
new /obj/item/clothing/head/helmet/space/rig/wizard(get_turf(H))
if("scrying")
new /obj/item/weapon/scrying(get_turf(H))
if (!(M_XRAY in H.mutations))
H.mutations.Add(M_XRAY)
if (!(XRAY in H.mutations))
H.mutations.Add(XRAY)
H.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
H.see_in_dark = 8
H.see_invisible = SEE_INVISIBLE_LEVEL_TWO
+1 -1
View File
@@ -90,7 +90,7 @@
icon_state = "construct"
desc = "A wicked machine used by those skilled in magical arts. It is inactive"
/obj/structure/constructshell/attackby(obj/item/O as obj, mob/user as mob)
/obj/structure/constructshell/attackby(obj/item/O as obj, mob/user as mob, params)
if(istype(O, /obj/item/device/soulstone))
O.transfer_soul("CONSTRUCT",src,user)
+3 -3
View File
@@ -12,7 +12,7 @@
var/op = 1
var/activepage
/obj/item/weapon/spellbook/attackby(obj/item/O as obj, mob/user as mob)
/obj/item/weapon/spellbook/attackby(obj/item/O as obj, mob/user as mob, params)
if(istype(O, /obj/item/weapon/contract))
var/obj/item/weapon/contract/contract = O
if(contract.used)
@@ -366,8 +366,8 @@
if("scrying")
feedback_add_details("wizard_spell_learned","SO") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
new /obj/item/weapon/scrying(get_turf(H))
if (!(M_XRAY in H.mutations))
H.mutations.Add(M_XRAY)
if (!(XRAY in H.mutations))
H.mutations.Add(XRAY)
H.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
H.see_in_dark = 8
H.see_invisible = SEE_INVISIBLE_LEVEL_TWO
+1 -1
View File
@@ -147,7 +147,7 @@
L.part = affected
H.dna.SetSEState(SOBERBLOCK,1)
H.mutations += M_SOBER
H.mutations += SOBER
H.check_mutations = 1
return 1
+2 -2
View File
@@ -31,7 +31,7 @@
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_in_backpack)
H.dna.SetSEState(SOBERBLOCK,1)
H.mutations += M_SOBER
H.mutations += SOBER
H.check_mutations = 1
return 1
@@ -226,7 +226,7 @@
H.equip_or_collect(new /obj/item/toy/crayon/rainbow(H), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/storage/fancy/crayons(H), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/reagent_containers/spray/waterflower(H), slot_in_backpack)
H.mutations.Add(M_CLUMSY)
H.mutations.Add(CLUMSY)
H.dna.SetSEState(COMICBLOCK,1,1)
genemutcheck(H,COMICBLOCK,null,MUTCHK_FORCED)
return 1
+2 -2
View File
@@ -44,7 +44,7 @@
min_temperature = T0C - (170 + (T*15))
current_heat_capacity = 1000 * ((H - 1) ** 2)
/obj/machinery/atmospherics/unary/cold_sink/freezer/attackby(obj/item/I, mob/user)
/obj/machinery/atmospherics/unary/cold_sink/freezer/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, "freezer-o", "freezer", I))
on = 0
update_icon()
@@ -201,7 +201,7 @@
max_temperature = T20C + (140 * T)
current_heat_capacity = 1000 * ((H - 1) ** 2)
/obj/machinery/atmospherics/unary/heat_reservoir/heater/attackby(obj/item/I, mob/user)
/obj/machinery/atmospherics/unary/heat_reservoir/heater/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, "heater-o", "heater", I))
on = 0
update_icon()
+3 -3
View File
@@ -43,7 +43,7 @@
del(src)
/obj/machinery/optable/attack_paw(mob/user as mob)
if ((M_HULK in usr.mutations))
if ((HULK in usr.mutations))
usr << text("\blue You destroy the operating table.")
visible_message("\red [usr] destroys the operating table!")
src.density = 0
@@ -56,7 +56,7 @@
return
/obj/machinery/optable/attack_hand(mob/user as mob)
if (M_HULK in usr.mutations)
if (HULK in usr.mutations)
usr << text("\blue You destroy the table.")
visible_message("\red [usr] destroys the operating table!")
src.density = 0
@@ -130,7 +130,7 @@
take_victim(usr,usr)
/obj/machinery/optable/attackby(obj/item/weapon/W as obj, mob/living/carbon/user as mob)
/obj/machinery/optable/attackby(obj/item/weapon/W as obj, mob/living/carbon/user as mob, params)
if (istype(W, /obj/item/weapon/grab))
if(iscarbon(W:affecting))
take_victim(W:affecting,usr)
+1 -1
View File
@@ -40,7 +40,7 @@
src.colorlist += D
/obj/machinery/pdapainter/attackby(var/obj/item/O as obj, var/mob/user as mob)
/obj/machinery/pdapainter/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/device/pda))
if(storedpda)
user << "There is already a PDA inside."
+9 -2
View File
@@ -68,8 +68,15 @@
src.connected = sleepernew
return
return
/obj/machinery/sleeper/attack_animal(var/mob/living/simple_animal/M)//Stop putting hostile mobs in things guise
if(M.environment_smash)
M.do_attack_animation(src)
visible_message("<span class='danger'>[M.name] smashes [src] apart!</span>")
qdel(src)
return
/obj/machinery/sleep_console/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
/obj/machinery/sleep_console/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob, params)
if (istype(G, /obj/item/weapon/screwdriver))
default_deconstruction_screwdriver(user, "console-p", "console", G)
return
@@ -285,7 +292,7 @@
return
/obj/machinery/sleeper/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
/obj/machinery/sleeper/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob, params)
if(istype(G, /obj/item/weapon/reagent_containers/glass))
if(!beaker)
beaker = G
+1 -1
View File
@@ -320,7 +320,7 @@
*/
/obj/machinery/body_scanconsole/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
/obj/machinery/body_scanconsole/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob, params)
if (istype(G, /obj/item/weapon/screwdriver))
default_deconstruction_screwdriver(user, "bodyscannerconsole-p", "bodyscannerconsole", G)
return
+1 -1
View File
@@ -28,7 +28,7 @@
src.uses = uses
src.power_change()
/obj/machinery/ai_slipper/attackby(obj/item/weapon/W, mob/user)
/obj/machinery/ai_slipper/attackby(obj/item/weapon/W, mob/user, params)
if(stat & (NOPOWER|BROKEN))
return
if (istype(user, /mob/living/silicon))
+4 -4
View File
@@ -930,7 +930,7 @@
updateUsrDialog()
/obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob)
/obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob, params)
/* if (istype(W, /obj/item/weapon/wirecutters))
stat ^= BROKEN
add_fingerprint(user)
@@ -1062,7 +1062,7 @@ Code shamelessly copied from apc_frame
icon_state = "alarm_bitem"
flags = CONDUCT
/obj/item/alarm_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/alarm_frame/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( get_turf(src.loc), 2 )
del(src)
@@ -1164,7 +1164,7 @@ FIRE ALARM
if(prob(50/severity)) alarm()
..()
/obj/machinery/firealarm/attackby(obj/item/W as obj, mob/user as mob)
/obj/machinery/firealarm/attackby(obj/item/W as obj, mob/user as mob, params)
src.add_fingerprint(user)
if (istype(W, /obj/item/weapon/screwdriver) && buildstage == 2)
@@ -1398,7 +1398,7 @@ Code shamelessly copied from apc_frame
icon_state = "fire_bitem"
flags = CONDUCT
/obj/item/firealarm_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/firealarm_frame/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( get_turf(src.loc), 2 )
del(src)
+2 -2
View File
@@ -101,7 +101,7 @@ obj/machinery/air_sensor
sensors = list()
src.updateUsrDialog()
attackby(I as obj, user as mob)
attackby(I as obj, user as mob, params)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
@@ -382,7 +382,7 @@ legend {
var/cutoff_temperature = 2000
var/on_temperature = 1200
attackby(I as obj, user as mob)
attackby(I as obj, user as mob, params)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
+1 -1
View File
@@ -337,7 +337,7 @@ update_flag
healthcheck()
return
/obj/machinery/portable_atmospherics/canister/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/portable_atmospherics/canister/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if(iswelder(W) && src.destroyed)
if(weld(W, user))
user << "\blue You salvage whats left of \the [src]"
+2 -2
View File
@@ -105,7 +105,7 @@
return ..()
/obj/machinery/meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
@@ -130,5 +130,5 @@
if (!target)
src.target = loc
/obj/machinery/meter/turf/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/meter/turf/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
return
@@ -82,7 +82,7 @@
return 1
/obj/machinery/portable_atmospherics/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
/obj/machinery/portable_atmospherics/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
var/obj/icon = src
if ((istype(W, /obj/item/weapon/tank) && !( src.destroyed )))
if (src.holding)
+2 -2
View File
@@ -48,7 +48,7 @@
else
icon_state = "scrubber:0"
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if(istype(W, /obj/item/weapon/wrench))
if(on)
user << "\blue Turn it off first!"
@@ -65,7 +65,7 @@
/obj/machinery/portable_atmospherics/scrubber/huge/stationary
name = "Stationary Air Scrubber"
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if(istype(W, /obj/item/weapon/wrench))
user << "\blue The bolts are too tight for you to unscrew!"
return
+1 -1
View File
@@ -101,7 +101,7 @@
return
/obj/machinery/autolathe/attackby(obj/item/O, mob/user)
/obj/machinery/autolathe/attackby(obj/item/O, mob/user, params)
if (busy)
user << "<span class=\"alert\">The autolathe is busy. Please wait for completion of previous operation.</span>"
return 1
+1 -1
View File
@@ -43,7 +43,7 @@
..()
return
/obj/machinery/apiary/attackby(var/obj/item/O as obj, var/mob/user as mob)
/obj/machinery/apiary/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/queen_bee))
if(health > 0)
user << "\red There is already a queen in there."
+1 -1
View File
@@ -50,7 +50,7 @@
icon_state = "biogen-work"
return
/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob)
/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/weapon/reagent_containers/glass) && !panel_open)
if(beaker)
user << "<span class='warning'>A container is already loaded into the machine.</span>"
+4 -1
View File
@@ -145,6 +145,8 @@
user << "[src] is in pristine condition."
/obj/machinery/bot/attack_alien(var/mob/living/carbon/alien/user as mob)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
health -= rand(15,30)*brute_dam_coeff
visible_message("<span class='userdanger'>[user] has slashed [src]!</span>")
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
@@ -154,6 +156,7 @@
/obj/machinery/bot/attack_animal(var/mob/living/simple_animal/M as mob)
M.do_attack_animation(src)
if(M.melee_damage_upper == 0)
return
health -= M.melee_damage_upper
@@ -229,7 +232,7 @@
return 1 //Successful completion. Used to prevent child process() continuing if this one is ended early.
/obj/machinery/bot/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/bot/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/screwdriver))
if(!locked)
open = !open
+2 -2
View File
@@ -116,7 +116,7 @@ text("<A href='?src=\ref[src];power=1'>[on ? "On" : "Off"]</A>"))
beacon_freq = freq
updateUsrDialog()
/obj/machinery/bot/cleanbot/attackby(obj/item/weapon/W, mob/user as mob)
/obj/machinery/bot/cleanbot/attackby(obj/item/weapon/W, mob/user as mob, params)
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if(allowed(usr) && !open && !emagged)
locked = !locked
@@ -262,7 +262,7 @@ text("<A href='?src=\ref[src];power=1'>[on ? "On" : "Off"]</A>"))
qdel(src)
return
/obj/item/weapon/bucket_sensor/attackby(var/obj/item/W, mob/user as mob)
/obj/item/weapon/bucket_sensor/attackby(var/obj/item/W, mob/user as mob, params)
..()
if(istype(W, /obj/item/robot_parts/l_arm) || istype(W, /obj/item/robot_parts/r_arm))
user.drop_item()
+3 -3
View File
@@ -170,7 +170,7 @@ Auto Patrol[]"},
declare_arrests = !declare_arrests
updateUsrDialog()
/obj/machinery/bot/ed209/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/bot/ed209/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (allowed(user) && !open && !emagged)
locked = !locked
@@ -257,7 +257,7 @@ Auto Patrol[]"},
icon_state = "[lasercolor]ed209[on]"
var/mob/living/carbon/M = target
if(istype(M, /mob/living/carbon/human))
if( M.stuttering < 5 && !(M_HULK in M.mutations) )
if( M.stuttering < 5 && !(HULK in M.mutations) )
M.stuttering = 5
M.Stun(5)
M.Weaken(5)
@@ -538,7 +538,7 @@ Auto Patrol[]"},
/obj/item/weapon/ed209_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/ed209_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/weapon/pen))
+3 -3
View File
@@ -161,7 +161,7 @@
src.updateUsrDialog()
return
/obj/machinery/bot/farmbot/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/bot/farmbot/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (src.allowed(user))
src.locked = !src.locked
@@ -531,7 +531,7 @@
new /obj/structure/reagent_dispensers/watertank(src)
/obj/structure/reagent_dispensers/watertank/attackby(var/obj/item/robot_parts/S, mob/user as mob)
/obj/structure/reagent_dispensers/watertank/attackby(var/obj/item/robot_parts/S, mob/user as mob, params)
if ((!istype(S, /obj/item/robot_parts/l_arm)) && (!istype(S, /obj/item/robot_parts/r_arm)))
..()
@@ -547,7 +547,7 @@
user.unEquip(S)
del(S)
/obj/item/weapon/farmbot_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/farmbot_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if((istype(W, /obj/item/device/analyzer/plant_analyzer)) && (!src.build_step))
src.build_step++
+4 -4
View File
@@ -133,7 +133,7 @@
return
/obj/machinery/bot/floorbot/attackby(var/obj/item/W , mob/user as mob)
/obj/machinery/bot/floorbot/attackby(var/obj/item/W , mob/user as mob, params)
if(istype(W, /obj/item/stack/tile/plasteel))
var/obj/item/stack/tile/plasteel/T = W
if(amount >= 50)
@@ -477,7 +477,7 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
return
/obj/item/weapon/storage/toolbox/mechanical/attackby(var/obj/item/stack/tile/plasteel/T, mob/user as mob)
/obj/item/weapon/storage/toolbox/mechanical/attackby(var/obj/item/stack/tile/plasteel/T, mob/user as mob, params)
if(!istype(T, /obj/item/stack/tile/plasteel))
..()
return
@@ -496,7 +496,7 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
user << "<span class='alert'>You need 10 floor tiles to start building a floorbot.</span>"
return
/obj/item/weapon/toolbox_tiles/attackby(var/obj/item/W, mob/user as mob)
/obj/item/weapon/toolbox_tiles/attackby(var/obj/item/W, mob/user as mob, params)
..()
if(isprox(W))
qdel(W)
@@ -516,7 +516,7 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
created_name = t
/obj/item/weapon/toolbox_tiles_sensor/attackby(var/obj/item/W, mob/user as mob)
/obj/item/weapon/toolbox_tiles_sensor/attackby(var/obj/item/W, mob/user as mob, params)
..()
if(istype(W, /obj/item/robot_parts/l_arm) || istype(W, /obj/item/robot_parts/r_arm))
qdel(W)
+3 -3
View File
@@ -220,7 +220,7 @@
updateUsrDialog()
return
/obj/machinery/bot/medbot/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/bot/medbot/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (allowed(user) && !open && !emagged)
locked = !locked
@@ -541,7 +541,7 @@
* Medbot Assembly -- Can be made out of all three medkits.
*/
/obj/item/weapon/storage/firstaid/attackby(var/obj/item/robot_parts/S, mob/user as mob)
/obj/item/weapon/storage/firstaid/attackby(var/obj/item/robot_parts/S, mob/user as mob, params)
if ((!istype(S, /obj/item/robot_parts/l_arm)) && (!istype(S, /obj/item/robot_parts/r_arm)))
..()
@@ -567,7 +567,7 @@
qdel(src)
/obj/item/weapon/firstaid_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/firstaid_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/weapon/pen))
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
+1 -1
View File
@@ -86,7 +86,7 @@ var/global/mulebot_count = 0
// screwdriver: open/close hatch
// cell: insert it
// other: chance to knock rider off bot
/obj/machinery/bot/mulebot/attackby(var/obj/item/I, var/mob/user)
/obj/machinery/bot/mulebot/attackby(var/obj/item/I, var/mob/user, params)
if(istype(I, /obj/item/weapon/card/id) || istype(I, /obj/item/device/pda))
if(toggle_lock(user))
user << "<span class='notice'>Controls [(locked ? "locked" : "unlocked")].</span>"
+4 -4
View File
@@ -175,7 +175,7 @@ Auto Patrol: []"},
updateUsrDialog()
/obj/machinery/bot/secbot/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/bot/secbot/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if(allowed(user) && !open && !emagged)
locked = !locked
@@ -241,7 +241,7 @@ Auto Patrol: []"},
icon_state = "[base_icon][on]"
var/mob/living/carbon/M = target
if(istype(M, /mob/living/carbon/human))
if( M.stuttering < 5 && !(M_HULK in M.mutations) )
if( M.stuttering < 5 && !(HULK in M.mutations) )
M.stuttering = 5
if(harmbaton) // Bots with harmbaton enabled become shitcurity. - Dave
M.apply_damage(10)
@@ -412,7 +412,7 @@ Auto Patrol: []"},
//Secbot Construction
/obj/item/clothing/head/helmet/attackby(var/obj/item/device/assembly/signaler/S, mob/user as mob)
/obj/item/clothing/head/helmet/attackby(var/obj/item/device/assembly/signaler/S, mob/user as mob, params)
..()
if(!issignaler(S))
..()
@@ -431,7 +431,7 @@ Auto Patrol: []"},
else
return
/obj/item/weapon/secbot_assembly/attackby(obj/item/I, mob/user)
/obj/item/weapon/secbot_assembly/attackby(obj/item/I, mob/user, params)
..()
if(istype(I, /obj/item/weapon/weldingtool))
if(!build_step)
+2 -1
View File
@@ -103,6 +103,7 @@
return
if(indestructible)
return
user.do_attack_animation(src)
status = 0
visible_message("<span class='warning'>\The [user] slashes at [src]!</span>")
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
@@ -122,7 +123,7 @@
src.view_range = num
cameranet.updateVisibility(src, 0)
/obj/machinery/camera/attackby(obj/W as obj, mob/living/user as mob)
/obj/machinery/camera/attackby(obj/W as obj, mob/living/user as mob, params)
//invalidateCameraCache()
// DECONSTRUCTION
if(isscrewdriver(W))
@@ -21,7 +21,7 @@
4 = Screwdriver panel closed and is fully built (you cannot attach upgrades)
*/
/obj/item/weapon/camera_assembly/attackby(obj/item/W as obj, mob/living/user as mob)
/obj/item/weapon/camera_assembly/attackby(obj/item/W as obj, mob/living/user as mob, params)
switch(state)
+1 -1
View File
@@ -34,7 +34,7 @@
if(charging)
usr << "Current charge: [charging.charge]"
attackby(obj/item/weapon/W, mob/user)
attackby(obj/item/weapon/W, mob/user, params)
if(stat & BROKEN)
return
+1 -1
View File
@@ -328,7 +328,7 @@
return
//Let's unlock this early I guess. Might be too early, needs tweaking.
/obj/machinery/clonepod/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/clonepod/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/screwdriver))
if(occupant || mess || locked)
user << "<span class='notice'>The maintenance panel is locked.</span>"
@@ -161,7 +161,7 @@
/obj/machinery/computer/HolodeckControl/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
/obj/machinery/computer/HolodeckControl/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob, params)
return
/obj/machinery/computer/HolodeckControl/emag_act(user as mob)
@@ -365,7 +365,7 @@
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding get updated properly
/turf/simulated/floor/holofloor/attackby(obj/item/weapon/W as obj, mob/user as mob)
/turf/simulated/floor/holofloor/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
return
// HOLOFLOOR DOES NOT GIVE A FUCK
@@ -402,7 +402,7 @@
return // HOLOTABLE DOES NOT GIVE A FUCK
/obj/structure/table/holotable/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/table/holotable/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if(G.state<2)
@@ -522,7 +522,7 @@
density = 1
throwpass = 1
/obj/structure/holohoop/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/holohoop/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if(G.state<2)
@@ -580,7 +580,7 @@
..()
/obj/machinery/readybutton/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/readybutton/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
user << "The device is a solid button, there's nothing you can do with it!"
/obj/machinery/readybutton/attack_hand(mob/user as mob)
+2 -2
View File
@@ -10,7 +10,7 @@
var/obj/item/device/mmi/brain = null
/obj/structure/AIcore/attackby(obj/item/P as obj, mob/user as mob)
/obj/structure/AIcore/attackby(obj/item/P as obj, mob/user as mob, params)
switch(state)
if(0)
if(istype(P, /obj/item/weapon/wrench))
@@ -179,7 +179,7 @@
empty_playable_ai_cores -= src
..()
/obj/structure/AIcore/deactivated/attackby(var/obj/item/W, var/mob/user)
/obj/structure/AIcore/deactivated/attackby(var/obj/item/W, var/mob/user, params)
if(istype(W, /obj/item/device/aicard))//Is it?
var/obj/item/device/aicard/card = W
card.transfer_ai("INACTIVE","AICARD",src,user)
+1 -1
View File
@@ -13,7 +13,7 @@
src.overlays += image('icons/obj/computer.dmi', "ai-fixer-empty")
/obj/machinery/computer/aifixer/attackby(I as obj, user as mob)
/obj/machinery/computer/aifixer/attackby(I as obj, user as mob, params)
if(istype(I, /obj/item/device/aicard))
if(stat & (NOPOWER|BROKEN))
user << "This terminal isn't functioning right now, get it working!"
@@ -233,7 +233,7 @@
board_type = "honkcomputer"
/obj/item/weapon/circuitboard/supplycomp/attackby(obj/item/I as obj, mob/user as mob)
/obj/item/weapon/circuitboard/supplycomp/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I,/obj/item/device/multitool))
var/catastasis = src.contraband_enabled
var/opposite_catastasis
@@ -255,7 +255,7 @@
user << "DERP! BUG! Report this (And what you were doing to cause it) to Agouri"
return
/obj/item/weapon/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob)
/obj/item/weapon/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I,/obj/item/weapon/screwdriver))
user.visible_message("\blue \the [user] adjusts the jumper on the [src]'s access protocol pins.", "\blue You adjust the jumper on the access protocol pins.")
if(src.build_path == "/obj/machinery/computer/rdconsole/core")
@@ -268,7 +268,7 @@
user << "\blue Access protocols set to default."
return
/obj/structure/computerframe/attackby(obj/item/P as obj, mob/user as mob)
/obj/structure/computerframe/attackby(obj/item/P as obj, mob/user as mob, params)
switch(state)
if(0)
if(istype(P, /obj/item/weapon/wrench))
@@ -379,7 +379,7 @@
name = "Bananium Computer-frame"
icon = 'icons/obj/machines/HONKputer.dmi'
/obj/structure/computerframe/HONKputer/attackby(obj/item/P as obj, mob/user as mob)
/obj/structure/computerframe/HONKputer/attackby(obj/item/P as obj, mob/user as mob, params)
switch(state)
if(0)
if(istype(P, /obj/item/weapon/wrench))
+1 -1
View File
@@ -53,7 +53,7 @@
return 1
// Network configuration
attackby(I as obj, user as mob)
attackby(I as obj, user as mob, params)
access = list()
if(istype(I,/obj/item/weapon/card/id)) // If hit by a regular ID card.
var/obj/item/weapon/card/id/E = I
+1 -1
View File
@@ -55,7 +55,7 @@
usr << "There is nothing to remove from the console."
return
/obj/machinery/computer/card/attackby(obj/item/weapon/card/id/id_card, mob/user)
/obj/machinery/computer/card/attackby(obj/item/weapon/card/id/id_card, mob/user, params)
if(!istype(id_card))
return ..()
+2 -2
View File
@@ -73,7 +73,7 @@
return podf
/obj/machinery/computer/cloning/attackby(obj/item/W as obj, mob/user as mob)
/obj/machinery/computer/cloning/attackby(obj/item/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/disk/data)) //INSERT SOME DISKETTES
if (!src.diskette)
user.drop_item()
@@ -329,7 +329,7 @@
scantemp = "<span class=\"bad\">Error: Mental interface failure.</span>"
nanomanager.update_uis(src)
return
if ((M_NOCLONE in subject.mutations) && src.scanner.scan_level < 2)
if ((NOCLONE in subject.mutations) && src.scanner.scan_level < 2)
scantemp = "<span class=\"bad\">Error: Mental interface failure.</span>"
nanomanager.update_uis(src)
return
+25 -5
View File
@@ -103,7 +103,7 @@
update_icon()
/obj/machinery/computer/attackby(I as obj, user as mob)
/obj/machinery/computer/attackby(I as obj, user as mob, params)
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
@@ -127,8 +127,28 @@
src.attack_hand(user)
return
/obj/machinery/computer/attack_paw(mob/living/user)
user.do_attack_animation(src)
if(circuit)
if(prob(10))
user.visible_message("<span class='danger'>[user.name] smashes the [src.name] with its paws.</span>",\
"<span class='danger'>You smash the [src.name] with your paws.</span>",\
"<span class='danger'>You hear a smashing sound.</span>")
set_broken()
return
user.visible_message("<span class='danger'>[user.name] smashes against the [src.name] with its paws.</span>",\
"<span class='danger'>You smash against the [src.name] with your paws.</span>",\
"<span class='danger'>You hear a clicking sound.</span>")
/obj/machinery/computer/attack_alien(mob/living/user)
user.do_attack_animation(src)
if(circuit)
if(prob(80))
user.visible_message("<span class='danger'>[user.name] smashes the [src.name] with its claws.</span>",\
"<span class='danger'>You smash the [src.name] with your claws.</span>",\
"<span class='danger'>You hear a smashing sound.</span>")
set_broken()
return
user.visible_message("<span class='danger'>[user.name] smashes against the [src.name] with its claws.</span>",\
"<span class='danger'>You smash against the [src.name] with your claws.</span>",\
"<span class='danger'>You hear a clicking sound.</span>")
+1 -1
View File
@@ -90,7 +90,7 @@
onclose(user, "honkputer")
/obj/machinery/computer/HONKputer/attackby(I as obj, user as mob)
/obj/machinery/computer/HONKputer/attackby(I as obj, user as mob, params)
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
+2 -2
View File
@@ -26,7 +26,7 @@
return
attackby(obj/item/weapon/O as obj, mob/user as mob)
attackby(obj/item/weapon/O as obj, mob/user as mob, params)
if (user.z > 6)
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return
@@ -63,7 +63,7 @@
var/mob/living/silicon/robot/current = null
attackby(obj/item/weapon/aiModule/module as obj, mob/user as mob)
attackby(obj/item/weapon/aiModule/module as obj, mob/user as mob, params)
if(istype(module, /obj/item/weapon/aiModule))
module.install(src)
else
+1 -1
View File
@@ -36,7 +36,7 @@
l_color = "#50AB00"
/obj/machinery/computer/message_monitor/attackby(obj/item/weapon/O as obj, mob/living/user as mob)
/obj/machinery/computer/message_monitor/attackby(obj/item/weapon/O as obj, mob/living/user as mob, params)
if(stat & (NOPOWER|BROKEN))
return
if(!istype(user))

Some files were not shown because too many files have changed in this diff Show More