Merge remote-tracking branch 'upstream/master' into Fixes

This commit is contained in:
Fox-McCloud
2015-02-23 16:47:55 -05:00
595 changed files with 4293 additions and 2237 deletions
+1 -1
View File
@@ -13,7 +13,7 @@
return
evidencebagEquip(I, user)
/obj/item/weapon/evidencebag/attackby(obj/item/I, mob/user)
/obj/item/weapon/evidencebag/attackby(obj/item/I, mob/user, params)
if(evidencebagEquip(I, user))
return 1
+1 -1
View File
@@ -119,7 +119,7 @@ var/global/sent_honksquad = 0
equip_to_slot_or_del(new /obj/item/toy/crayon/rainbow(src), slot_in_backpack)
equip_to_slot_or_del(new /obj/item/weapon/gun/energy/clown(src), slot_in_backpack)
equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/spray/waterflower(src), slot_in_backpack)
src.mutations.Add(M_CLUMSY)
src.mutations.Add(CLUMSY)
+1 -1
View File
@@ -119,7 +119,7 @@
return 0
attackby(obj/item/weapon/W as obj, mob/user as mob)
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(isassembly(W))
var/obj/item/device/assembly/A = W
if((!A.secured) && (!secured))
+2 -2
View File
@@ -23,9 +23,9 @@
overlays += bombassembly.overlays
overlays += "bomb_assembly"
/obj/item/device/onetankbomb/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/device/onetankbomb/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/device/analyzer))
bombtank.attackby(W, user)
bombtank.attackby(W, user, params)
return
if(istype(W, /obj/item/weapon/wrench) && !status) //This is basically bomb assembly code inverted. apparently it works.
+1 -1
View File
@@ -130,7 +130,7 @@
return
attackby(obj/item/weapon/W as obj, mob/user as mob)
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/screwdriver))
if(!a_left || !a_right)
user << "\red BUG:Assembly part missing, please report this!"
+3 -3
View File
@@ -19,7 +19,7 @@
if(!armed)
if(ishuman(usr))
var/mob/living/carbon/human/user = usr
if(((user.getBrainLoss() >= 60 || (M_CLUMSY in user.mutations)) && prob(50)))
if(((user.getBrainLoss() >= 60 || (CLUMSY in user.mutations)) && prob(50)))
user << "Your hand slips, setting off the trigger."
pulse(0)
update_icon()
@@ -69,7 +69,7 @@
if(!armed)
user << "<span class='notice'>You arm [src].</span>"
else
if(((user.getBrainLoss() >= 60 || (M_CLUMSY in user.mutations)) && prob(50)))
if(((user.getBrainLoss() >= 60 || (CLUMSY in user.mutations)) && prob(50)))
var/which_hand = "l_hand"
if(!user.hand)
which_hand = "r_hand"
@@ -85,7 +85,7 @@
attack_hand(mob/living/user as mob)
if(armed)
if(((user.getBrainLoss() >= 60 || M_CLUMSY in user.mutations)) && prob(50))
if(((user.getBrainLoss() >= 60 || CLUMSY in user.mutations)) && prob(50))
var/which_hand = "l_hand"
if(!user.hand)
which_hand = "r_hand"
+1 -1
View File
@@ -15,7 +15,7 @@
..()
return
/obj/item/assembly/shock_kit/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/assembly/shock_kit/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/wrench) && !status)
var/turf/T = loc
if(ismob(T))
+2 -2
View File
@@ -137,7 +137,7 @@ obj/machinery/gateway/centerstation/process()
return
/obj/machinery/gateway/centerstation/attackby(obj/item/device/W as obj, mob/user as mob)
/obj/machinery/gateway/centerstation/attackby(obj/item/device/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/device/multitool))
user << "\black The gate is already calibrated, there is no work for you to do here."
return
@@ -234,7 +234,7 @@ obj/machinery/gateway/centerstation/process()
M.dir = SOUTH
/obj/machinery/gateway/centeraway/attackby(obj/item/device/W as obj, mob/user as mob)
/obj/machinery/gateway/centeraway/attackby(obj/item/device/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/device/multitool))
if(calibrated)
user << "\black The gate is already calibrated, there is no work for you to do here."
@@ -77,9 +77,9 @@
if("Power")
user << "<B>Your wish is granted, but at a terrible cost...</B>"
user << "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart."
user.mutations.Add(M_LASER)
user.mutations.Add(M_RESIST_COLD)
user.mutations.Add(M_XRAY)
user.mutations.Add(LASER)
user.mutations.Add(RESIST_COLD)
user.mutations.Add(XRAY)
user.dna.mutantrace = "shadow"
user.regenerate_icons()
if("Wealth")
+2 -2
View File
@@ -1464,8 +1464,8 @@ datum/preferences
else continue
if(disabilities & DISABILITY_FLAG_FAT && character.species.flags & CAN_BE_FAT)//character.species.flags & CAN_BE_FAT)
character.mutations += M_FAT
character.mutations += M_OBESITY
character.mutations += FAT
character.mutations += OBESITY
if(disabilities & DISABILITY_FLAG_NEARSIGHTED)
character.disabilities|=NEARSIGHTED
if(disabilities & DISABILITY_FLAG_EPILEPTIC)
+3 -3
View File
@@ -160,7 +160,7 @@ BLIND // can't see anything
var/clipped = 0
species_restricted = list("exclude","Unathi","Tajaran")
/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user)
/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/wirecutters))
if(clipped == 0)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
@@ -344,7 +344,7 @@ BLIND // can't see anything
if (AC.slot == A.slot)
return 0
/obj/item/clothing/under/attackby(obj/item/I, mob/user)
/obj/item/clothing/under/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/clothing/accessory))
var/obj/item/clothing/accessory/A = I
if(can_attach_accessory(A))
@@ -362,7 +362,7 @@ BLIND // can't see anything
if(accessories.len)
for(var/obj/item/clothing/accessory/A in accessories)
A.attackby(I, user)
A.attackby(I, user, params)
return
..()
+1 -1
View File
@@ -158,7 +158,7 @@
/obj/item/clothing/mask/gas/sechailer/hos
icon_state = "hosmask"
/obj/item/clothing/mask/gas/sechailer/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/clothing/mask/gas/sechailer/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/screwdriver))
switch(aggressiveness)
if(1)
+1 -1
View File
@@ -97,7 +97,7 @@
src.icon_state = "orange"
return
/obj/item/clothing/shoes/orange/attackby(H as obj, loc)
/obj/item/clothing/shoes/orange/attackby(H as obj, loc, params)
..()
if ((istype(H, /obj/item/weapon/restraints/handcuffs) && !( src.chained )))
//H = null
+1 -1
View File
@@ -174,7 +174,7 @@ var/global/list/breach_burn_descriptors = list(
//Handles repairs (and also upgrades).
/obj/item/clothing/suit/space/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/clothing/suit/space/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/stack/sheet/mineral/plastic) || istype(W,/obj/item/stack/sheet/metal))
if(istype(src.loc,/mob/living))
+1 -1
View File
@@ -221,7 +221,7 @@
helmet.flags |= NODROP
H << "\blue You deploy your hardsuit helmet, sealing you off from the world."
/obj/item/clothing/suit/space/rig/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/clothing/suit/space/rig/attackby(obj/item/W as obj, mob/user as mob, params)
if(!istype(user,/mob/living)) return
+2 -2
View File
@@ -16,9 +16,9 @@
if (pockets.handle_mousedrop(usr, over_object))
..(over_object)
/obj/item/clothing/suit/storage/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/clothing/suit/storage/attackby(obj/item/W as obj, mob/user as mob, params)
..()
pockets.attackby(W, user)
pockets.attackby(W, user, params)
/obj/item/clothing/suit/storage/emp_act(severity)
pockets.emp_act(severity)
@@ -35,7 +35,7 @@
src.add_fingerprint(user)
//default attackby behaviour
/obj/item/clothing/accessory/attackby(obj/item/I, mob/user)
/obj/item/clothing/accessory/attackby(obj/item/I, mob/user, params)
..()
//default attack_hand behaviour
@@ -188,7 +188,7 @@
if(isliving(user))
user.visible_message("\red [user] displays their NanoTrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.","\red You display your NanoTrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.")
/obj/item/clothing/accessory/holobadge/attackby(var/obj/item/O as obj, var/mob/user as mob)
/obj/item/clothing/accessory/holobadge/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/weapon/card/id) || istype(O, /obj/item/device/pda))
var/obj/item/weapon/card/id/id_card = null
@@ -70,7 +70,7 @@
..(user)
/obj/item/clothing/accessory/holster/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/clothing/accessory/holster/attackby(obj/item/W as obj, mob/user as mob, params)
holster(W, user)
/obj/item/clothing/accessory/holster/emp_act(severity)
@@ -29,8 +29,8 @@
if (hold.handle_mousedrop(usr, over_object))
..(over_object)
/obj/item/clothing/accessory/storage/attackby(obj/item/W as obj, mob/user as mob)
return hold.attackby(W, user)
/obj/item/clothing/accessory/storage/attackby(obj/item/W as obj, mob/user as mob, params)
return hold.attackby(W, user, params)
/obj/item/clothing/accessory/storage/emp_act(severity)
hold.emp_act(severity)
+1 -1
View File
@@ -21,7 +21,7 @@
return
attackby(obj/item/clothing/under/U as obj, mob/user as mob)
attackby(obj/item/clothing/under/U as obj, mob/user as mob, params)
..()
if(istype(U, /obj/item/clothing/under/chameleon))
user << "\red Nothing happens."
+1 -1
View File
@@ -76,7 +76,7 @@
completed = /obj/machinery/computer3/laptop
max_components = 3
/obj/structure/computer3frame/attackby(obj/item/P as obj, mob/user as mob)
/obj/structure/computer3frame/attackby(obj/item/P as obj, mob/user as mob, params)
switch(state)
if(0)
if(istype(P, /obj/item/weapon/wrench))
+3 -3
View File
@@ -24,7 +24,7 @@
// If the computer is attacked by an item it will reference this to decide which peripheral(s) are affected.
var/list/attackby_types = list()
proc/allow_attackby(var/obj/item/I as obj,var/mob/user as mob)
proc/allow_attackby(var/obj/item/I as obj,var/mob/user as mob, params)
for(var/typekey in attackby_types)
if(istype(I,typekey))
@@ -60,7 +60,7 @@
return
..()
attackby(obj/I as obj,mob/user as mob)
attackby(obj/I as obj,mob/user as mob, params)
if(computer && !computer.stat)
if(istype(I, /obj/item/device/aicard))
I:transfer_ai("AIFIXER","AICARD",src,user)
@@ -94,7 +94,7 @@
usr << "You are unable to insert \the card, as the reader slot is occupied"
return 0
attackby(var/obj/item/I as obj, var/mob/user as mob)
attackby(var/obj/item/I as obj, var/mob/user as mob, params)
if(istype(I,/obj/item/weapon/card))
insert(I)
return
+2 -2
View File
@@ -317,7 +317,7 @@
if(os)
os.error = BUSTED_ASS_COMPUTER
attackby(I as obj, mob/user as mob)
attackby(I as obj, mob/user as mob, params)
if(istype(I, /obj/item/weapon/screwdriver) && allow_disassemble)
disassemble(user)
return
@@ -341,7 +341,7 @@
P = input(user,"Which component?") as null|anything in p_list
if(P)
P.attackby(I,user)
P.attackby(I,user, params)
return
..()
+2 -2
View File
@@ -24,7 +24,7 @@
return
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 (user.z > 6)
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return
@@ -60,7 +60,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
@@ -22,7 +22,7 @@ var/prison_shuttle_timeleft = 0
var/prison_break = 0
attackby(I as obj, user as mob)
attackby(I as obj, user as mob, params)
return src.attack_hand(user)
@@ -34,7 +34,7 @@ var/prison_shuttle_timeleft = 0
return src.attack_hand(user)
attackby(I as obj, user as mob)
attackby(I as obj, user as mob, params)
if(istype(I, /obj/item/tool/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
+1 -1
View File
@@ -11,7 +11,7 @@
var/list/authorized = list( )
attackby(var/obj/item/card/W as obj, var/mob/user as mob)
attackby(var/obj/item/card/W as obj, var/mob/user as mob, params)
if(stat & (BROKEN|NOPOWER)) return
if ((!( istype(W, /obj/item/card) ) || !( ticker ) || emergency_shuttle.location != 1 || !( user ))) return
if (istype(W, /obj/item/card/id)||istype(W, /obj/item/device/pda))
@@ -159,7 +159,7 @@ var/specops_shuttle_timeleft = 0
if(specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return 0
else return 1
/obj/machinery/computer3/specops_shuttle/attackby(I as obj, user as mob)
/obj/machinery/computer3/specops_shuttle/attackby(I as obj, user as mob, params)
return attack_hand(user)
/obj/machinery/computer3/specops_shuttle/attack_ai(var/mob/user as mob)
@@ -168,7 +168,7 @@ var/specops_shuttle_timeleft = 0
/obj/machinery/computer3/specops_shuttle/attack_paw(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer3/specops_shuttle/attackby(I as obj, user as mob)
/obj/machinery/computer3/specops_shuttle/attackby(I as obj, user as mob, params)
if(istype(I,/obj/item/card/emag))
user << "\blue The electronic systems in this console are far too advanced for your primitive hacking peripherals."
else
@@ -36,7 +36,7 @@
return 1
/obj/machinery/computer3/syndicate_station/attackby(obj/item/I as obj, mob/user as mob)
/obj/machinery/computer3/syndicate_station/attackby(obj/item/I as obj, mob/user as mob, params)
return attack_hand(user)
/obj/machinery/computer3/syndicate_station/attack_ai(mob/user as mob)
@@ -172,7 +172,7 @@ var/syndicate_elite_shuttle_timeleft = 0
if(syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return 0
else return 1
/obj/machinery/computer3/syndicate_elite_shuttle/attackby(I as obj, user as mob)
/obj/machinery/computer3/syndicate_elite_shuttle/attackby(I as obj, user as mob, params)
return attack_hand(user)
/obj/machinery/computer3/syndicate_elite_shuttle/attack_ai(var/mob/user as mob)
@@ -181,7 +181,7 @@ var/syndicate_elite_shuttle_timeleft = 0
/obj/machinery/computer3/syndicate_elite_shuttle/attack_paw(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer3/syndicate_elite_shuttle/attackby(I as obj, user as mob)
/obj/machinery/computer3/syndicate_elite_shuttle/attackby(I as obj, user as mob, params)
if(istype(I,/obj/item/card/emag))
user << "\blue The electronic systems in this console are far too advanced for your primitive hacking peripherals."
else
+1 -1
View File
@@ -37,7 +37,7 @@
return
/obj/machinery/lapvend/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/lapvend/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(vendmode == 1)
if(istype(W, /obj/item/weapon/card))
var/obj/item/weapon/card/I = W
+1 -1
View File
@@ -85,7 +85,7 @@ Programs are a file that can be executed
*/
/datum/file/program/proc/attackby(O as obj, user as mob)
/datum/file/program/proc/attackby(O as obj, user as mob, params)
return
/*
+1 -1
View File
@@ -114,7 +114,7 @@
inserted = null
attackby(obj/O as obj, mob/user as mob)
attackby(obj/O as obj, mob/user as mob, params)
if(inserted && istype(O,/obj/item/weapon/pen))
usr << "You use [O] to carefully pry [inserted] out of [src]."
eject_disk(forced = 1)
+4 -4
View File
@@ -18,7 +18,7 @@
// CRAFTING //
/obj/item/weaponcrafting/receiver/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/weaponcrafting/receiver/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/pipe))
user << "You attach the shotgun barrel to the receiver. The pins seem loose."
var/obj/item/weaponcrafting/ishotgunconstruction/I = new /obj/item/weaponcrafting/ishotgunconstruction
@@ -36,7 +36,7 @@
icon = 'icons/obj/improvised.dmi'
icon_state = "ishotgunstep1"
/obj/item/weaponcrafting/ishotgunconstruction/attackby(var/obj/item/I, mob/user as mob)
/obj/item/weaponcrafting/ishotgunconstruction/attackby(var/obj/item/I, mob/user as mob, params)
..()
if(istype(I, /obj/item/weapon/screwdriver))
var/obj/item/weaponcrafting/ishotgunconstruction2/C = new /obj/item/weaponcrafting/ishotgunconstruction2
@@ -51,7 +51,7 @@
icon = 'icons/obj/improvised.dmi'
icon_state = "ishotgunstep1"
/obj/item/weaponcrafting/ishotgunconstruction2/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/weaponcrafting/ishotgunconstruction2/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weaponcrafting/stock))
user << "You attach the stock to the receiver-barrel assembly."
var/obj/item/weaponcrafting/ishotgunconstruction3/I = new /obj/item/weaponcrafting/ishotgunconstruction3
@@ -67,7 +67,7 @@
icon = 'icons/obj/improvised.dmi'
icon_state = "ishotgunstep2"
/obj/item/weaponcrafting/ishotgunconstruction3/attackby(var/obj/item/I, mob/user as mob)
/obj/item/weaponcrafting/ishotgunconstruction3/attackby(var/obj/item/I, mob/user as mob, params)
..()
if(istype(I, /obj/item/stack/packageWrap))
var/obj/item/stack/packageWrap/C = I
+1 -1
View File
@@ -859,7 +859,7 @@
held.loc = get_turf(user)
src.held = null
/obj/item/clothing/accessory/fluff/konaa_hirano/attackby(var/obj/item/O as obj, mob/user as mob)
/obj/item/clothing/accessory/fluff/konaa_hirano/attackby(var/obj/item/O as obj, mob/user as mob, params)
if(istype(O,/obj/item/weapon/paper))
if(held)
usr << "[src] already has something inside it."
+4 -4
View File
@@ -56,7 +56,7 @@
del(milled_item)
busy = 0
/obj/machinery/mill/attackby(var/obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/mill/attackby(var/obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/reagent_containers/food))
user.unEquip(W)
W.loc = src
@@ -126,7 +126,7 @@
del(fermenting_item)
busy = 0
/obj/machinery/fermenter/attackby(var/obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/fermenter/attackby(var/obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/reagent_containers/food))
user.unEquip(W)
W.loc = src
@@ -187,7 +187,7 @@
del(destilling_item)
busy = 0
/obj/machinery/still/attackby(var/obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/still/attackby(var/obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/reagent_containers/food))
user.unEquip(W)
W.loc = src
@@ -272,7 +272,7 @@
output += spinning_item
busy = 0
/obj/machinery/centrifuge/attackby(var/obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/centrifuge/attackby(var/obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/reagent_containers/food))
user.unEquip(W)
W.loc = src
+1 -1
View File
@@ -85,7 +85,7 @@ log transactions
linked_db = DB
break
/obj/machinery/atm/attackby(obj/item/I as obj, mob/user as mob)
/obj/machinery/atm/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/weapon/card))
var/obj/item/weapon/card/id/idcard = I
if(!held_card)
+1 -1
View File
@@ -56,7 +56,7 @@
machine_id = "[station_name()] Acc. DB #[num_financial_terminals++]"
..()
/obj/machinery/account_database/attackby(obj/O, mob/user)
/obj/machinery/account_database/attackby(obj/O, mob/user, params)
if(!istype(O, /obj/item/weapon/card/id))
return ..()
+1 -1
View File
@@ -100,7 +100,7 @@
else
user << browse(null,"window=eftpos")
/obj/item/device/eftpos/attackby(O as obj, user as mob)
/obj/item/device/eftpos/attackby(O as obj, user as mob, params)
if(istype(O, /obj/item/weapon/card))
//attempt to connect to a new db, and if that doesn't work then fail
if(!linked_db)
+1 -1
View File
@@ -482,7 +482,7 @@ var/const/POS_HEADER = {"<html>
products[pid]=LI
src.attack_hand(usr)
/obj/machinery/pos/attackby(var/atom/movable/A, var/mob/user)
/obj/machinery/pos/attackby(var/atom/movable/A, var/mob/user, params)
if(istype(A,/obj/item/weapon/card/id))
var/obj/item/weapon/card/id/I = A
if(!logged_in)
+1 -1
View File
@@ -46,7 +46,7 @@
/obj/effect/portal/wormhole/attack_hand(mob/user)
teleport(user)
/obj/effect/portal/wormhole/attackby(obj/item/I, mob/user)
/obj/effect/portal/wormhole/attackby(obj/item/I, mob/user, params)
teleport(user)
/obj/effect/portal/wormhole/teleport(atom/movable/M)
+132 -185
View File
@@ -11,18 +11,19 @@ Gunshots/explosions/opening doors/less rare audio (done)
*/
mob/living/carbon/var
image/halimage
image/halbody
obj/halitem
hal_screwyhud = 0 //1 - critical, 2 - dead, 3 - oxygen indicator, 4 - toxin indicator
handling_hal = 0
hal_crit = 0
mob/living/carbon/
var/image/halimage
var/image/halbody
var/obj/halitem
var/hal_screwyhud = 0 //1 - critical, 2 - dead, 3 - oxygen indicator, 4 - toxin indicator
var/handling_hal = 0
var/hal_crit = 0
mob/living/carbon/proc/handle_hallucinations()
if(handling_hal) return
if(handling_hal)
return
handling_hal = 1
while(client && hallucination > 20)
while(hallucination > 20)
sleep(rand(200,500)/(hallucination/25))
var/halpick = rand(1,100)
switch(halpick)
@@ -77,9 +78,7 @@ mob/living/carbon/proc/handle_hallucinations()
halitem.name = "Flashbang"
if(client) client.screen += halitem
spawn(rand(100,250))
if(client)
client.screen -= halitem
halitem = null
qdel(halitem)
if(26 to 40)
//Flashes of danger
//src << "Danger Flash"
@@ -111,7 +110,7 @@ mob/living/carbon/proc/handle_hallucinations()
if(41 to 65)
//Strange audio
//src << "Strange Audio"
switch(rand(1,12))
switch(rand(1,14))
if(1) src << 'sound/machines/airlock.ogg'
if(2)
if(prob(50))src << 'sound/effects/Explosion1.ogg'
@@ -142,9 +141,14 @@ mob/living/carbon/proc/handle_hallucinations()
'sound/hallucinations/look_up1.ogg', 'sound/hallucinations/look_up2.ogg', 'sound/hallucinations/over_here1.ogg', 'sound/hallucinations/over_here2.ogg', 'sound/hallucinations/over_here3.ogg',\
'sound/hallucinations/turn_around1.ogg', 'sound/hallucinations/turn_around2.ogg', 'sound/hallucinations/veryfar_noise.ogg', 'sound/hallucinations/wail.ogg')
src << pick(creepyasssounds)
if(13)
src << "<span class='warning'>You feel a tiny prick!</span>"
if(14)
src << "<h1 class='alert'>Priority Announcement</h1>"
src << "<br><br><span class='alert'>The Emergency Shuttle has docked with the station. You have 3 minutes to board the Emergency Shuttle.</span><br><br>"
src << sound('sound/AI/shuttledock.ogg')
if(66 to 70)
//Flashes of danger
//src << "Danger Flash"
if(!halbody)
var/list/possible_points = list()
for(var/turf/simulated/floor/F in view(src,world.view))
@@ -158,8 +162,6 @@ mob/living/carbon/proc/handle_hallucinations()
halbody = image('icons/mob/human.dmi',target,"husk_s",TURF_LAYER)
if(4)
halbody = image('icons/mob/alien.dmi',target,"alienother",TURF_LAYER)
// if(5)
// halbody = image('xcomalien.dmi',target,"chryssalid",TURF_LAYER)
if(client) client.images += halbody
spawn(rand(50,80)) //Only seen for a brief moment.
@@ -167,55 +169,58 @@ mob/living/carbon/proc/handle_hallucinations()
halbody = null
if(71 to 72)
//Fake death
// src.sleeping_willingly = 1
src.sleeping = 20
hal_crit = 1
hal_screwyhud = 1
spawn(rand(50,100))
// src.sleeping_willingly = 0
src.sleeping = 0
hal_crit = 0
hal_screwyhud = 0
if(73 to 75)
fake_attack()
handling_hal = 0
/mob/living/carbon/proc/fake_attack()
// var/list/possible_clones = new/list()
var/mob/living/carbon/human/clone = null
var/clone_weapon = null
for(var/mob/living/carbon/human/H in living_mob_list)
if(H.stat || H.lying)
continue
// possible_clones += H
clone = H
break //changed the code a bit. Less randomised, but less work to do. Should be ok, world.contents aren't stored in any particular order.
/*obj/machinery/proc/mockpanel(list/buttons,start_txt,end_txt,list/mid_txts)
// if(!possible_clones.len) return
// clone = pick(possible_clones)
if(!clone)
return
if(!mocktxt)
//var/obj/effect/fake_attacker/F = new/obj/effect/fake_attacker(outside_range(target))
var/obj/effect/fake_attacker/F = new/obj/effect/fake_attacker(src.loc)
if(clone.l_hand)
if(!(locate(clone.l_hand) in non_fakeattack_weapons))
clone_weapon = clone.l_hand.name
F.weap = clone.l_hand
else if (clone.r_hand)
if(!(locate(clone.r_hand) in non_fakeattack_weapons))
clone_weapon = clone.r_hand.name
F.weap = clone.r_hand
mocktxt = ""
F.name = clone.name
F.my_target = src
F.weapon_name = clone_weapon
src.hallucinations += F
var/possible_txt = list("Launch Escape Pods","Self-Destruct Sequence","\[Swipe ID\]","De-Monkify",\
"Reticulate Splines","Plasma","Open Valve","Lockdown","Nerf Airflow","Kill Traitor","Nihilism",\
"OBJECTION!","Arrest Stephen Bowman","Engage Anti-Trenna Defenses","Increase Captain IQ","Retrieve Arms",\
"Play Charades","Oxygen","Inject BeAcOs","Ninja Lizards","Limit Break","Build Sentry")
F.left = image(clone,dir = WEST)
F.right = image(clone,dir = EAST)
F.up = image(clone,dir = NORTH)
F.down = image(clone,dir = SOUTH)
if(mid_txts)
while(mid_txts.len)
var/mid_txt = pick(mid_txts)
mocktxt += mid_txt
mid_txts -= mid_txt
F.updateimage()
while(buttons.len)
var/button = pick(buttons)
var/button_txt = pick(possible_txt)
mocktxt += "<a href='?src=\ref[src];[button]'>[button_txt]</a><br>"
buttons -= button
possible_txt -= button_txt
return start_txt + mocktxt + end_txt + "</TT></BODY></HTML>"
proc/check_panel(mob/M)
if (istype(M, /mob/living/carbon/human) || istype(M, /mob/living/silicon/ai))
if(M.hallucination < 15)
return 1
return 0*/
/obj/effect/fake_attacker
icon = null
@@ -231,7 +236,7 @@ proc/check_panel(mob/M)
var/image/stand_icon = null
var/image/currentimage = null
var/icon/base = null
var/s_tone
var/skin_tone
var/mob/living/clone = null
var/image/left
var/image/right
@@ -241,99 +246,103 @@ proc/check_panel(mob/M)
var/health = 100
attackby(var/obj/item/weapon/P as obj, mob/user as mob)
/obj/effect/fake_attacker/attackby(var/obj/item/weapon/P as obj, mob/living/user as mob, params)
step_away(src,my_target,2)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
my_target << sound(pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg'))
my_target.visible_message("<span class='danger'>[my_target] flails around wildly.</span>", \
"<span class='danger'>[my_target] has attacked [src]!</span>")
src.health -= P.force
return
/obj/effect/fake_attacker/Crossed(var/mob/M, somenumber)
if(M == my_target)
step_away(src,my_target,2)
for(var/mob/M in oviewers(world.view,my_target))
M << "\red <B>[my_target] flails around wildly.</B>"
my_target.show_message("\red <B>[src] has been attacked by [my_target] </B>", 1) //Lazy.
if(prob(30))
for(var/mob/O in oviewers(world.view , my_target))
O << "<span class='danger'>[my_target] stumbles around.</span>"
src.health -= P.force
/obj/effect/fake_attacker/New()
..()
spawn(300)
if(my_target)
my_target.hallucinations -= src
qdel(src)
step_away(src,my_target,2)
spawn attack_loop()
return
Crossed(var/mob/M, somenumber)
if(M == my_target)
step_away(src,my_target,2)
if(prob(30))
for(var/mob/O in oviewers(world.view , my_target))
O << "\red <B>[my_target] stumbles around.</B>"
New()
..()
spawn(300)
if(my_target)
my_target.hallucinations -= src
del(src)
step_away(src,my_target,2)
spawn attack_loop()
/obj/effect/fake_attacker/proc/updateimage()
// del src.currentimage
proc/updateimage()
// del src.currentimage
if(src.dir == NORTH)
del src.currentimage
src.currentimage = new /image(up,src)
else if(src.dir == SOUTH)
del src.currentimage
src.currentimage = new /image(down,src)
else if(src.dir == EAST)
del src.currentimage
src.currentimage = new /image(right,src)
else if(src.dir == WEST)
del src.currentimage
src.currentimage = new /image(left,src)
my_target << currentimage
if(src.dir == NORTH)
del src.currentimage
src.currentimage = new /image(up,src)
else if(src.dir == SOUTH)
del src.currentimage
src.currentimage = new /image(down,src)
else if(src.dir == EAST)
del src.currentimage
src.currentimage = new /image(right,src)
else if(src.dir == WEST)
del src.currentimage
src.currentimage = new /image(left,src)
my_target << currentimage
proc/attack_loop()
while(1)
sleep(rand(5,10))
if(src.health < 0)
collapse()
continue
if(get_dist(src,my_target) > 1)
src.dir = get_dir(src,my_target)
step_towards(src,my_target)
updateimage()
else
if(prob(15))
if(weapon_name)
my_target << sound(pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg'))
my_target.show_message("\red <B>[my_target] has been attacked with [weapon_name] by [src.name] </B>", 1)
my_target.staminaloss += 30
if(prob(20)) my_target.eye_blurry += 3
if(prob(33))
if(!locate(/obj/effect/overlay) in my_target.loc)
fake_blood(my_target)
else
my_target << sound(pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg'))
my_target.show_message("\red <B>[src.name] has punched [my_target]!</B>", 1)
my_target.staminaloss += 30
if(prob(33))
if(!locate(/obj/effect/overlay) in my_target.loc)
fake_blood(my_target)
/obj/effect/fake_attacker/proc/attack_loop()
while(1)
sleep(rand(5,10))
if(src.health < 0)
collapse()
continue
if(get_dist(src,my_target) > 1)
src.dir = get_dir(src,my_target)
step_towards(src,my_target)
updateimage()
else
if(prob(15))
step_away(src,my_target,2)
src.do_attack_animation(my_target)
if(weapon_name)
my_target << sound(pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg'))
my_target.show_message("<span class='danger'>[src.name] has attacked [my_target] with [weapon_name]!</span>", 1)
my_target.staminaloss += 30
if(prob(20))
my_target.eye_blurry += 3
if(prob(33))
if(!locate(/obj/effect/overlay) in my_target.loc)
fake_blood(my_target)
else
my_target << sound(pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg'))
my_target.show_message("<span class='userdanger'>[src.name] has punched [my_target]!</span>", 1)
my_target.staminaloss += 30
if(prob(33))
if(!locate(/obj/effect/overlay) in my_target.loc)
fake_blood(my_target)
proc/collapse()
collapse = 1
updateimage()
if(prob(15))
step_away(src,my_target,2)
/proc/fake_blood(var/mob/target)
/obj/effect/fake_attacker/proc/collapse()
collapse = 1
updateimage()
/obj/effect/fake_attacker/proc/fake_blood(var/mob/target)
var/obj/effect/overlay/O = new/obj/effect/overlay(target.loc)
O.name = "blood"
var/image/I = image('icons/effects/blood.dmi',O,"floor[rand(1,7)]",O.dir,1)
target << I
spawn(300)
del(O)
qdel(O)
return
var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/item/ammo_box/a357,\
/obj/item/weapon/gun/energy/kinetic_accelerator/crossbow, /obj/item/weapon/melee/energy/sword,\
/obj/item/weapon/gun/energy/crossbow, /obj/item/weapon/melee/energy/sword,\
/obj/item/weapon/storage/box/syndicate, /obj/item/weapon/storage/box/emps,\
/obj/item/weapon/cartridge/syndicate, /obj/item/clothing/under/chameleon,\
/obj/item/clothing/shoes/syndigaloshes, /obj/item/weapon/card/id/syndicate,\
@@ -347,65 +356,3 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite
/obj/item/clothing/under/rank/captain, /obj/item/device/aicard,\
/obj/item/clothing/shoes/magboots, /obj/item/blueprints, /obj/item/weapon/disk/nuclear,\
/obj/item/clothing/suit/space/nasavoid, /obj/item/weapon/tank)
/proc/fake_attack(var/mob/living/target)
// var/list/possible_clones = new/list()
var/mob/living/carbon/human/clone = null
var/clone_weapon = null
for(var/mob/living/carbon/human/H in living_mob_list)
if(H.stat || H.lying) continue
// possible_clones += H
clone = H
break //changed the code a bit. Less randomised, but less work to do. Should be ok, world.contents aren't stored in any particular order.
// if(!possible_clones.len) return
// clone = pick(possible_clones)
if(!clone) return
//var/obj/effect/fake_attacker/F = new/obj/effect/fake_attacker(outside_range(target))
var/obj/effect/fake_attacker/F = new/obj/effect/fake_attacker(target.loc)
if(clone.l_hand)
if(!(locate(clone.l_hand) in non_fakeattack_weapons))
clone_weapon = clone.l_hand.name
F.weap = clone.l_hand
else if (clone.r_hand)
if(!(locate(clone.r_hand) in non_fakeattack_weapons))
clone_weapon = clone.r_hand.name
F.weap = clone.r_hand
F.name = clone.name
F.my_target = target
F.weapon_name = clone_weapon
target.hallucinations += F
F.left = image(clone,dir = WEST)
F.right = image(clone,dir = EAST)
F.up = image(clone,dir = NORTH)
F.down = image(clone,dir = SOUTH)
// F.base = new /icon(clone.stand_icon)
// F.currentimage = new /image(clone)
/*
F.left = new /icon(clone.stand_icon,dir=WEST)
for(var/icon/i in clone.overlays)
F.left.Blend(i)
F.up = new /icon(clone.stand_icon,dir=NORTH)
for(var/icon/i in clone.overlays)
F.up.Blend(i)
F.down = new /icon(clone.stand_icon,dir=SOUTH)
for(var/icon/i in clone.overlays)
F.down.Blend(i)
F.right = new /icon(clone.stand_icon,dir=EAST)
for(var/icon/i in clone.overlays)
F.right.Blend(i)
target << F.up
*/
F.updateimage()
+1 -1
View File
@@ -90,7 +90,7 @@ obj/machinery/cooker/proc/gettype()
var/obj/item/weapon/reagent_containers/food/snacks/type = new(get_turf(src))
return type
obj/machinery/cooker/attackby(obj/item/I, mob/user)
obj/machinery/cooker/attackby(obj/item/I, mob/user, params)
if(stat & (NOPOWER|BROKEN))
return
if (!checkValid(I, user))
+13 -13
View File
@@ -1,31 +1,31 @@
/obj/item/weapon/reagent_containers/food/snacks/breadslice/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/weapon/reagent_containers/food/snacks/breadslice/attackby(obj/item/W as obj, mob/user as mob, params)
var/obj/item/weapon/reagent_containers/food/snacks/customizable/sandwich/S = new(get_turf(user))
S.attackby(W,user)
S.attackby(W,user, params)
qdel(src)
/obj/item/weapon/reagent_containers/food/snacks/bun/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/weapon/reagent_containers/food/snacks/bun/attackby(obj/item/W as obj, mob/user as mob, params)
var/obj/item/weapon/reagent_containers/food/snacks/customizable/burger/S = new(get_turf(user))
S.attackby(W,user)
S.attackby(W,user, params)
qdel(src)
/obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough/attackby(obj/item/W as obj, mob/user as mob, params)
if(!istype(W, /obj/item/weapon/kitchenknife)) //Ignore this if object is kitchen knife - make dough slices instead of kitchen knife pizza
var/obj/item/weapon/reagent_containers/food/snacks/customizable/pizza/S = new(get_turf(user))
S.attackby(W,user)
S.attackby(W,user, params)
qdel(src)
else //It's a kitchen knife. Go do the parent proc (slicing)
..()
/obj/item/weapon/reagent_containers/food/snacks/boiledspagetti/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/weapon/reagent_containers/food/snacks/boiledspagetti/attackby(obj/item/W as obj, mob/user as mob, params)
var/obj/item/weapon/reagent_containers/food/snacks/customizable/pasta/S = new(get_turf(user))
S.attackby(W,user)
S.attackby(W,user, params)
qdel(src)
/obj/item/trash/plate/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/trash/plate/attackby(obj/item/W as obj, mob/user as mob, params)
var/obj/item/weapon/reagent_containers/food/snacks/customizable/fullycustom/S = new(get_turf(user))
S.attackby(W,user)
S.attackby(W,user, params)
qdel(src)
/obj/item/trash/bowl
@@ -34,11 +34,11 @@
icon = 'icons/obj/food.dmi'
icon_state = "soup"
/obj/item/trash/bowl/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/trash/bowl/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/))
var/obj/item/weapon/reagent_containers/food/snacks/customizable/soup/S = new(get_turf(user))
S.attackby(W,user)
S.attackby(W,user, params)
qdel(src)
..()
@@ -311,7 +311,7 @@
basename = "burger"
toptype = new /obj/item/weapon/reagent_containers/food/snacks/bun()
/obj/item/weapon/reagent_containers/food/snacks/customizable/attackby(obj/item/I, mob/user)
/obj/item/weapon/reagent_containers/food/snacks/customizable/attackby(obj/item/I, mob/user, params)
if(src.contents.len > sandwich_limit)
user << "<span class='warning'>If you put anything else in or on [src] it's going to make a mess.</span>"
return
+1 -1
View File
@@ -29,7 +29,7 @@
R.my_atom = src
/obj/machinery/icemachine/attackby(obj/item/I, mob/user)
/obj/machinery/icemachine/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/reagent_containers/glass))
if(beaker)
user << "<span class='notice'>A container is already inside [src].</span>"
+2 -2
View File
@@ -15,7 +15,7 @@
..()
updatefood()
/obj/machinery/cooking/attackby(obj/item/I, mob/user)
/obj/machinery/cooking/attackby(obj/item/I, mob/user, params)
if(on)
user << "The machine is already running."
return
@@ -41,7 +41,7 @@
else
icon_state = "mixer_off"
C.loc = get_turf(src)
C.attackby(F,user)
C.attackby(F,user, params)
playsound(loc, 'sound/machines/ding.ogg', 50, 1)
updatefood()
return
+2 -2
View File
@@ -42,7 +42,7 @@
P.card_icon = "joker"
cards += P
/obj/item/weapon/deck/attackby(obj/O as obj, mob/user as mob)
/obj/item/weapon/deck/attackby(obj/O as obj, mob/user as mob, params)
if(istype(O,/obj/item/weapon/hand))
var/obj/item/weapon/hand/H = O
for(var/datum/playingcard/P in H.cards)
@@ -118,7 +118,7 @@
usr.visible_message("\The [usr] deals a card to \the [M].")
H.throw_at(get_step(M,M.dir),10,1,H)
/obj/item/weapon/hand/attackby(obj/O as obj, mob/user as mob)
/obj/item/weapon/hand/attackby(obj/O as obj, mob/user as mob, params)
if(istype(O,/obj/item/weapon/hand))
var/obj/item/weapon/hand/H = O
for(var/datum/playingcard/P in H.cards)
+3 -3
View File
@@ -50,7 +50,7 @@
origin_tech = "materials=1"
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
attackby(obj/item/weapon/W as obj, mob/user as mob)
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || (istype(W, /obj/item/weapon/twohanded/fireaxe) && W:wielded) || istype(W, /obj/item/weapon/melee/energy))
user.show_message("<span class='notice'>You make planks out of \the [src]!</span>", 1)
for(var/i=0,i<2,i++)
@@ -60,7 +60,7 @@
continue
if(G.amount>=G.max_amount)
continue
G.attackby(NG, user)
G.attackby(NG, user, params)
usr << "You add the newly-formed wood to the stack. It now contains [NG.amount] planks."
del(src)
return
@@ -201,7 +201,7 @@
throw_speed = 4
throw_range = 20
/obj/item/weapon/corncob/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/corncob/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/kitchen/utensil/knife) || istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/kitchenknife/ritual))
user << "<span class='notice'>You use [W] to fashion a pipe out of the corn cob!</span>"
+1 -1
View File
@@ -82,7 +82,7 @@
visible_message("\icon[src] [src] beeps and spits out [loaded_disk].")
loaded_disk = null
/obj/machinery/botany/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/botany/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/seeds))
if(seed)
user << "There is already a seed loaded."
+1 -1
View File
@@ -32,7 +32,7 @@
master.growth_queue -= src
..()
/obj/effect/plantsegment/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/effect/plantsegment/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
+1 -1
View File
@@ -27,7 +27,7 @@
A.loc = get_turf(src)
*/
/obj/structure/bush/attackby(var/obj/I as obj, var/mob/user as mob)
/obj/structure/bush/attackby(var/obj/I as obj, var/mob/user as mob, params)
//hatchets can clear away undergrowth
if(istype(I, /obj/item/weapon/hatchet) && !stump)
if(indestructable)
+2 -2
View File
@@ -28,7 +28,7 @@
I.loc = src
update_icon()
/obj/structure/bookcase/attackby(obj/O as obj, mob/user as mob)
/obj/structure/bookcase/attackby(obj/O as obj, mob/user as mob, params)
if(istype(O, /obj/item/weapon/book) || istype(O, /obj/item/weapon/spellbook))
user.drop_item()
O.loc = src
@@ -178,7 +178,7 @@
else
user << "This book is completely blank!"
/obj/item/weapon/book/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/book/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(carved)
if(!store)
if(W.w_class < 3)
+3 -3
View File
@@ -237,7 +237,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
user << browse(dat, "window=library")
onclose(user, "library")
/obj/machinery/librarycomp/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/librarycomp/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/barcodescanner))
var/obj/item/weapon/barcodescanner/scanner = W
scanner.computer = src
@@ -404,7 +404,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
density = 1
var/obj/item/weapon/book/cache // Last scanned book
/obj/machinery/libraryscanner/attackby(var/obj/O as obj, var/mob/user as mob)
/obj/machinery/libraryscanner/attackby(var/obj/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/weapon/book))
user.drop_item()
O.loc = src
@@ -454,7 +454,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
anchored = 1
density = 1
/obj/machinery/bookbinder/attackby(var/obj/O as obj, var/mob/user as mob)
/obj/machinery/bookbinder/attackby(var/obj/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/weapon/paper))
user.drop_item()
O.loc = src
@@ -48,7 +48,7 @@
broadcast() // Bzzt
/*
/obj/machinery/media/transmitter/broadcast/attackby(var/obj/item/W, mob/user)
/obj/machinery/media/transmitter/broadcast/attackby(var/obj/item/W, mob/user, params)
if(istype(W, /obj/item/device/multitool))
update_multitool_menu(user)
return 1
+1 -1
View File
@@ -155,7 +155,7 @@ var/global/loopModeNames=list(
popup.open()
/obj/machinery/media/jukebox/attackby(obj/item/W, mob/user)
/obj/machinery/media/jukebox/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weapon/card/emag))
current_song=0
if(!emagged)
+1 -1
View File
@@ -91,7 +91,7 @@
else
return ..()
/obj/structure/closet/crate/secure/loot/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/closet/crate/secure/loot/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(locked)
if (istype(W, /obj/item/weapon/card/emag))
user << "<span class='notice'>The crate unlocks!</span>"
+1 -1
View File
@@ -75,7 +75,7 @@
credits = 20
/obj/item/weapon/coin/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/coin/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/CC = W
if(string_attached)
+2 -2
View File
@@ -140,7 +140,7 @@
/obj/machinery/mining/drill/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
/obj/machinery/mining/drill/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/mining/drill/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/screwdriver))
if(active) return
open = !open
@@ -323,7 +323,7 @@
icon_state = "mining_brace"
var/obj/machinery/mining/drill/connected
/obj/machinery/mining/brace/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/mining/brace/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/wrench))
if(istype(get_turf(src),/turf/space))
+3 -3
View File
@@ -228,7 +228,7 @@
updateUsrDialog()
return
/obj/machinery/mineral/equipment_locker/attackby(obj/item/I as obj, mob/user as mob)
/obj/machinery/mineral/equipment_locker/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/weapon/mining_voucher))
RedeemVoucher(I, user)
return
@@ -285,7 +285,7 @@
icon_state = "data"
var/points = 500
/obj/item/weapon/card/mining_point_card/attackby(obj/item/I as obj, mob/user as mob)
/obj/item/weapon/card/mining_point_card/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/weapon/card/id))
if(points)
var/obj/item/weapon/card/id/C = I
@@ -484,7 +484,7 @@
projectilesound = 'sound/weapons/Gunshot4.ogg'
wanted_objects = list(/obj/item/weapon/ore)
/mob/living/simple_animal/hostile/mining_drone/attackby(obj/item/I as obj, mob/user as mob)
/mob/living/simple_animal/hostile/mining_drone/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/W = I
if(W.welding && !stat)
@@ -99,7 +99,7 @@ proc/move_labor_shuttle() //TODO: Security Access only; add moving the shuttle t
else
usr << "\blue Shuttle is already moving."
/obj/machinery/computer/labor_shuttle/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/computer/labor_shuttle/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/card/emag))
src.req_access = list()
@@ -61,7 +61,7 @@
user << browse("[dat]", "window=console_stacking_machine")
/obj/machinery/mineral/labor_claim_console/attackby(obj/item/I as obj, mob/user as mob)
/obj/machinery/mineral/labor_claim_console/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/weapon/card/id))
return attack_hand(user)
..()
@@ -181,7 +181,7 @@
/obj/machinery/mineral/labor_points_checker/attack_hand(mob/user)
user.examine(src)
/obj/machinery/mineral/labor_points_checker/attackby(obj/item/I as obj, mob/user as mob)
/obj/machinery/mineral/labor_points_checker/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/weapon/card/id))
if(istype(I, /obj/item/weapon/card/id/prisoner))
var/obj/item/weapon/card/id/prisoner/prisoner_id = I
+1 -1
View File
@@ -293,7 +293,7 @@
src.updateUsrDialog()
attackby(obj/item/weapon/W as obj, mob/user as mob)
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
var/load = 0
if(istype(W, /obj/item/weapon/ore/))
for(var/mob/O in viewers(user, null)) O.show_message(text("\blue [] loads [] into the [].", user, W, src), 1)
+2 -2
View File
@@ -103,7 +103,7 @@
scan_state = "rock_[mineral.name][rand(1,3)]"
//Not even going to touch this pile of spaghetti
attackby(obj/item/weapon/W as obj, mob/user as mob)
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
usr << "\red You don't have the dexterity to do this!"
@@ -420,7 +420,7 @@
gets_dug()
return
/turf/simulated/floor/plating/airless/asteroid/attackby(obj/item/weapon/W as obj, mob/user as mob)
/turf/simulated/floor/plating/airless/asteroid/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(!W || !user)
return 0
+1 -1
View File
@@ -72,7 +72,7 @@
*/
user << browse("[dat]", "window=moneybag")
/obj/item/weapon/moneybag/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/moneybag/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if (istype(W, /obj/item/weapon/coin))
var/obj/item/weapon/coin/C = W
+1 -1
View File
@@ -86,7 +86,7 @@
pixel_y = rand(0,8)-8
if(src.z == ASTEROID_Z) score_oremined++ //When ore spawns, increment score. Only include ore spawned on mining asteroid (No Clown Planet)
/obj/item/weapon/ore/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/ore/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/device/core_sampler))
var/obj/item/device/core_sampler/C = W
C.sample_item(src, user)
+1 -1
View File
@@ -18,7 +18,7 @@
var/amt_strange = 0
var/last_update = 0
/obj/structure/ore_box/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/ore_box/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/ore))
user.unEquip(W)
src.contents += W
+2 -2
View File
@@ -26,9 +26,9 @@
del(src)
/obj/item/weapon/holder/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/holder/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
for(var/mob/M in src.contents)
M.attackby(W,user)
M.attackby(W,user, params)
/obj/item/weapon/holder/proc/show_message(var/message, var/m_type)
for(var/mob/living/M in contents)
@@ -125,7 +125,7 @@
/mob/living/carbon/alien/proc/handle_mutations_and_radiation()
if(getFireLoss())
if((M_RESIST_HEAT in mutations) || prob(5))
if((RESIST_HEAT in mutations) || prob(5))
adjustFireLoss(-1)
// Aliens love radiation nom nom nom
@@ -8,7 +8,7 @@
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
var/muzzled = is_muzzled()
switch(act)
if ("me")
@@ -70,15 +70,12 @@
///mob/living/carbon/alien/humanoid/bullet_act(var/obj/item/projectile/Proj) taken care of in living
/mob/living/carbon/alien/humanoid/emp_act(severity)
if(wear_suit) wear_suit.emp_act(severity)
if(head) head.emp_act(severity)
if(r_store) r_store.emp_act(severity)
if(l_store) l_store.emp_act(severity)
..()
/mob/living/carbon/alien/humanoid/ex_act(severity)
if(!blinded)
flick("flash", flash)
..()
var/shielded = 0
@@ -86,7 +83,6 @@
var/f_loss = null
switch (severity)
if (1.0)
b_loss += 500
gib()
return
@@ -122,11 +118,10 @@
if(shielded)
damage /= 4
show_message("\red The blob attacks!")
show_message("<span class='userdanger'>The blob attacks!</span>")
adjustFireLoss(damage)
return
/mob/living/carbon/alien/humanoid/meteorhit(O as obj)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
@@ -138,6 +133,35 @@
updatehealth()
return
/mob/living/carbon/alien/humanoid/attack_paw(mob/living/carbon/monkey/M as mob)
if(!ismonkey(M)) return//Fix for aliens receiving double messages when attacking other aliens.
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
switch(M.a_intent)
if ("help")
help_shake_act(M)
else
M.do_attack_animation(src)
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
return
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
"<span class='userdanger'>[M.name] bites [src]!</span>")
if (health > -100)
adjustBruteLoss(rand(1, 3))
updatehealth()
return
/mob/living/carbon/alien/humanoid/attack_slime(mob/living/carbon/slime/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
@@ -145,12 +169,11 @@
if(M.Victim) return // can't attack while eating!
if (health > -100)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
if (stat > -100)
M.do_attack_animation(src)
visible_message("<span class='danger'>The [M.name] glomps [src]!</span>", \
"<span class='userdanger'>The [M.name] glomps [src]!</span>")
var/damage = rand(1, 3)
if(M.is_adult)
@@ -177,9 +200,8 @@
if(M.powerlevel < 0)
M.powerlevel = 0
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
visible_message("<span class='danger'>The [M.name] has shocked [src]!</span>", \
"<span class='userdanger'>The [M.name] has shocked [src]!</span>")
Weaken(power)
if (stuttering < power)
@@ -198,6 +220,19 @@
return
/mob/living/carbon/alien/humanoid/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
"<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
updatehealth()
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
@@ -207,95 +242,135 @@
M << "No attacking people at spawn, you jackass."
return
if(..()) //to allow surgery to return properly.
return
switch(M.a_intent)
if ("help")
help_shake_act(M)
if ("grab")
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
M.put_in_active_hand(G)
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
if ("harm")
M.do_attack_animation(src)
var/damage = rand(1, 9)
if (prob(90))
if (HULK in M.mutations)//HULK SMASH
damage += 14
spawn(0)
Weaken(damage) // Why can a hulk knock an alien out but not knock out a human? Damage is robust enough.
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(loc, "punch", 25, 1, -1)
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
"<span class='userdanger'>[M] has punched [src]!</span>")
if ((stat != DEAD) && (damage > 9||prob(5)))//Regular humans have a very small chance of weakening an alien.
Weaken(1,5)
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
"<span class='userdanger'>[M] has weakened [src]!</span>", \
"<span class='danger'>You hear someone fall.</span>")
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to punch [src]!</span>")
if ("disarm")
if (!lying)
if (prob(5))//Very small chance to push an alien down.
Weaken(2)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M] has pushed down [src]!</span>", \
"<span class='userdanger'>[M] has pushed down [src]!</span>")
else
if (prob(50))
drop_item()
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M] has disarmed [src]!</span>", \
"<span class='userdanger'>[M] has disarmed [src]!</span>")
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to disarm [src]!</span>")
return
/*Code for aliens attacking aliens. Because aliens act on a hivemind, I don't see them as very aggressive with each other.
As such, they can either help or harm other aliens. Help works like the human help command while harm is a simple nibble.
In all, this is a lot like the monkey code. /N
*/
/mob/living/carbon/alien/humanoid/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
switch(M.a_intent)
if ("help")
sleeping = max(0,sleeping-5)
resting = 0
AdjustParalysis(-3)
AdjustStunned(-3)
AdjustWeakened(-3)
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake it up!</span>")
else
if (health > 0)
help_shake_act(M)
else
if (M.health >= -75.0)
if (((M.head && M.head.flags & 4) || ((M.wear_mask && !( M.wear_mask.flags & 32 )) || ((head && head.flags & 4) || (wear_mask && !( wear_mask.flags & 32 ))))))
M << "\blue <B>Remove that mask!</B>"
return
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = M
O.target = src
O.s_loc = M.loc
O.t_loc = loc
O.place = "CPR"
requests += O
spawn( 0 )
O.process()
return
M.do_attack_animation(src)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
var/damage = rand(1, 3)
visible_message("<span class='danger'>[M.name] bites [src]!!</span>", \
"<span class='userdanger'>[M.name] bites [src]!!</span>")
if ("grab")
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
M.put_in_active_hand(G)
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
if ("harm")
var/damage = rand(1, 9)
if (prob(90))
if (M_HULK in M.mutations)//M_HULK SMASH
damage += 14
spawn(0)
Paralyse(1)
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(loc, "punch", 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
if (damage > 9||prob(5))//Regular humans have a very small chance of weakening an alien.
Paralyse(2)
for(var/mob/O in viewers(M, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has weakened []!</B>", M, src), 1, "\red You hear someone fall.", 2)
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to punch []!</B>", M, src), 1)
if ("disarm")
if (!lying)
if (prob(5))//Very small chance to push an alien down.
Paralyse(2)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has pushed down []!</B>", M, src), 1)
else
if (prob(50))
drop_item()
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed []!</B>", M, src), 1)
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to disarm []!</B>", M, src), 1)
M << "<span class='warning'>[name] is too injured for that.</span>"
return
/mob/living/carbon/alien/humanoid/attack_larva(mob/living/carbon/alien/larva/L as mob)
switch(L.a_intent)
if("help")
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
else
if (health > 0)
L.do_attack_animation(src)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
var/damage = rand(1, 3)
visible_message("<span class='danger'>[L.name] bites [src]!!</span>", \
"<span class='userdanger'>[L.name] bites [src]!!</span>")
adjustBruteLoss(damage)
updatehealth()
else
L << "<span class='warning'>[name] is too injured for that.</span>"
return
/mob/living/carbon/alien/humanoid/restrained()
if (handcuffed)
return 1
@@ -187,7 +187,7 @@
/mob/living/carbon/alien/humanoid/proc/handle_regular_hud_updates()
if (stat == 2 || (M_XRAY in mutations))
if (stat == 2 || (XRAY in mutations))
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
@@ -8,7 +8,7 @@
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
var/muzzled = is_muzzled()
switch(act)
if ("me")
@@ -36,7 +36,7 @@
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && (M_FAT in tmob.mutations))
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(70))
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
@@ -71,14 +71,12 @@
/mob/living/carbon/alien/larva/ex_act(severity)
if(!blinded)
flick("flash", flash)
..()
var/b_loss = null
var/f_loss = null
switch (severity)
if (1.0)
b_loss += 500
gib()
return
@@ -119,7 +117,7 @@
//paralysis += 1
show_message("\red The blob attacks you!")
show_message("<span class='userdanger'>The blob attacks you!</span>")
adjustFireLoss(damage)
@@ -130,7 +128,7 @@
//can't equip anything
/mob/living/carbon/alien/larva/attack_ui(slot_id)
return
/mob/living/carbon/alien/larva/meteorhit(O as obj)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
@@ -142,31 +140,164 @@
updatehealth()
return
/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M as mob)
if(..())
var/damage = rand(1, 9)
if (prob(90))
if (M_HULK in M.mutations)
damage += 5
spawn(0)
Paralyse(1)
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(loc, "punch", 25, 1, -1)
add_logs(M, src, "attacked")
visible_message("<span class='danger'>[M] has kicked [src]!</span>", \
"<span class='userdanger'>[M] has kicked [src]!</span>")
if ((stat != DEAD) && (damage > 4.9))
Paralyse(rand(5,10))
/mob/living/carbon/alien/larva/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
"<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
add_logs(M, src, "attacked", admin=0)
updatehealth()
adjustBruteLoss(damage)
updatehealth()
/mob/living/carbon/alien/larva/attack_paw(mob/living/carbon/monkey/M as mob)
if(!(istype(M, /mob/living/carbon/monkey))) return//Fix for aliens receiving double messages when attacking other aliens.
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
switch(M.a_intent)
if ("help")
help_shake_act(M)
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to kick [src]!</span>", \
"<span class='userdanger'>[M] has attempted to kick [src]!</span>")
M.do_attack_animation(src)
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
return
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
"<span class='userdanger'>[M.name] bites [src]!</span>")
if (health > -100)
adjustBruteLoss(rand(1, 3))
updatehealth()
return
/mob/living/carbon/alien/larva/attack_slime(mob/living/carbon/slime/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if(M.Victim)
return // can't attack while eating!
if (stat != DEAD)
M.do_attack_animation(src)
visible_message("<span class='danger'>The [M.name] glomps [src]!</span>", \
"<span class='userdanger'>The [M.name] glomps [src]!</span>")
var/damage = rand(1, 3)
if(M.is_adult)
damage = rand(20, 40)
else
damage = rand(5, 35)
adjustBruteLoss(damage)
updatehealth()
return
/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
switch(M.a_intent)
if ("help")
help_shake_act(M)
if ("grab")
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
M.put_in_active_hand(G)
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
else
M.do_attack_animation(src)
var/damage = rand(1, 9)
if (prob(90))
if (HULK in M.mutations)
damage += 5
spawn(0)
Paralyse(1)
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(loc, "punch", 25, 1, -1)
visible_message("<span class='danger'>[M] has kicked [src]!</span>", \
"<span class='userdanger'>[M] has kicked [src]!</span>")
if ((stat != DEAD) && (damage > 4.9))
Weaken(rand(5,10))
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
"<span class='userdanger'>[M] has weakened [src]!</span>", \
"<span class='danger'>You hear someone fall.</span>")
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to kick [src]!</span>", \
"<span class='userdanger'>[M] has attempted to kick [src]!</span>")
return
/mob/living/carbon/alien/larva/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
..()
switch(M.a_intent)
if ("help")
sleeping = max(0,sleeping-5)
resting = 0
AdjustParalysis(-3)
AdjustStunned(-3)
AdjustWeakened(-3)
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake it up!</span>")
else
if (health > 0)
M.do_attack_animation(src)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
var/damage = 1
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
"<span class='userdanger'>[M.name] bites [src]!</span>")
adjustBruteLoss(damage)
updatehealth()
else
M << "<span class='warning'>[name] is too injured for that.</span>"
return
/mob/living/carbon/alien/larva/restrained()
@@ -135,7 +135,7 @@
/mob/living/carbon/alien/larva/proc/handle_regular_hud_updates()
if (stat == 2 || (M_XRAY in mutations))
if (stat == 2 || (XRAY in mutations))
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
+1 -1
View File
@@ -101,7 +101,7 @@
breath.toxins -= toxins_used
breath.oxygen += toxins_used
if(breath.temperature > (T0C+66) && !(M_RESIST_COLD in mutations)) // Hot air hurts :(
if(breath.temperature > (T0C+66) && !(RESIST_COLD in mutations)) // Hot air hurts :(
if(prob(20))
src << "<span class='danger'>You feel a searing heat in your lungs!</span>"
fire_alert = max(fire_alert, 1)
@@ -55,7 +55,7 @@ var/const/MAX_ACTIVE_TIME = 400
if (sterile)
user << "<span class='userdanger'>It looks like the proboscis has been removed.</span>"
/obj/item/clothing/mask/facehugger/attackby(var/obj/item/O,var/mob/m)
/obj/item/clothing/mask/facehugger/attackby(var/obj/item/O,var/mob/m, params)
if(O.force)
Die()
return
@@ -33,7 +33,7 @@
M.client.mob = new/mob/living/carbon/alien/humanoid/special/snakeman(new/obj/effect/snake_egg(src.loc))
visible_message("[src] injects [M] with an egg.")
visible_message("The egg absorbs [M]")
M.mutations |= M_NOCLONE
M.mutations |= NOCLONE
M.update_body()
M.death()
else
+1 -1
View File
@@ -21,7 +21,7 @@
var/mob/living/silicon/robot = null//Appears unused.
var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
attackby(var/obj/item/O as obj, var/mob/user as mob)
attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O,/obj/item/brain) && !brainmob) //Time to stick a brain in it --NEO
if(!O:brainmob)
user << "\red You aren't sure where this brain came from, but you're pretty sure it's a useless brain."
+1 -1
View File
@@ -193,7 +193,7 @@
proc/handle_regular_hud_updates()
if (stat == 2 || (M_XRAY in src.mutations))
if (stat == 2 || (XRAY in src.mutations))
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
+4 -1
View File
@@ -17,7 +17,7 @@
src.nutrition -= HUNGER_FACTOR/10
if(src.m_intent == "run")
src.nutrition -= HUNGER_FACTOR/10
if((M_FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360)
if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360)
src.bodytemperature += 2
// Moving around increases germ_level faster
@@ -588,3 +588,6 @@
/mob/living/carbon/proc/canBeHandcuffed()
return 0
/mob/living/carbon/is_muzzled()
return(istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
@@ -151,7 +151,7 @@
return
/mob/living/carbon/human/proc/ChangeToHusk()
if(M_HUSK in mutations) return
if(HUSK in mutations) return
if(f_style)
f_style = "Shaved" //we only change the icon_state of the hair datum, so it doesn't mess up their UI/UE
@@ -159,7 +159,7 @@
h_style = "Bald"
update_hair(0)
mutations.Add(M_HUSK)
mutations.Add(HUSK)
status_flags |= DISFIGURED //makes them unknown without fucking up other stuff like admintools
update_body(0)
update_mutantrace()
@@ -167,5 +167,5 @@
/mob/living/carbon/human/proc/Drain()
ChangeToHusk()
mutations |= M_NOCLONE
mutations |= NOCLONE
return
@@ -9,7 +9,7 @@
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
var/muzzled = is_muzzled()
//var/m_type = 1
for (var/obj/item/weapon/implant/I in src)
@@ -653,7 +653,7 @@
if("fart")
if(world.time-lastFart >= 600)
// playsound(src.loc, 'sound/effects/fart.ogg', 50, 1, -3) //Admins still vote no to fun
if(M_TOXIC_FARTS in mutations)
if(TOXIC_FARTS in mutations)
message = "<b>[src]</b> unleashes a [pick("horrible","terrible","foul","disgusting","awful")] fart."
else
message = "<b>[src]</b> [pick("passes wind","farts")]."
@@ -661,7 +661,7 @@
var/turf/location = get_turf(src)
var/aoe_range=2 // Default
if(M_SUPER_FART in mutations)
if(SUPER_FART in mutations)
aoe_range+=3 //Was 5
/* // If we're wearing a suit, don't blast or gas those around us.
@@ -673,7 +673,7 @@
wearing_mask=1 */
// Process toxic farts first.
if(M_TOXIC_FARTS in mutations)
if(TOXIC_FARTS in mutations)
for(var/mob/M in range(location,aoe_range))
if (M.internal != null && M.wear_mask && (M.wear_mask.flags & MASKINTERNALS))
continue
@@ -698,7 +698,7 @@
sleep(10)
S.start()
*/
if(M_SUPER_FART in mutations)
if(SUPER_FART in mutations)
visible_message("\red <b>[name]</b> hunches down and grits their teeth!")
if(do_after(usr,30))
visible_message("\red <b>[name]</b> unleashes a [pick("tremendous","gigantic","colossal")] fart!","You hear a [pick("tremendous","gigantic","colossal")] fart.")
@@ -205,7 +205,7 @@
if(suiciding)
msg += "<span class='warning'>[t_He] appears to have commited suicide... there is no hope of recovery.</span>\n"
if(M_DWARF in mutations)
if(DWARF in mutations)
msg += "[t_He] [t_is] a halfling!\n"
var/distance = get_dist(usr,src)
+26 -6
View File
@@ -143,8 +143,8 @@
slime.UpdateFeed()
return
if(istype(tmob, /mob/living/carbon/human) && (M_FAT in tmob.mutations))
if(prob(40) && !(M_FAT in src.mutations))
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(40) && !(FAT in src.mutations))
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
@@ -368,6 +368,7 @@
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
@@ -384,6 +385,25 @@
apply_damage(damage, BRUTE, affecting, armor, M.name)
if(armor >= 2) return
/mob/living/carbon/human/attack_larva(mob/living/carbon/alien/larva/L as mob)
switch(L.a_intent)
if("help")
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
else
L.do_attack_animation(src)
var/damage = rand(1, 3)
visible_message("<span class='danger'>[L] bites [src]!</span>", \
"<span class='userdanger'>[L] bites [src]!</span>")
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
if(stat != DEAD)
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
var/datum/organ/external/affecting = get_organ(ran_zone(L.zone_sel.selecting))
var/armor_block = run_armor_check(affecting, "melee")
apply_damage(damage, BRUTE, affecting, armor_block)
/mob/living/carbon/human/proc/is_loyalty_implanted(mob/living/carbon/human/M)
for(var/L in M.contents)
@@ -398,9 +418,9 @@
if (health > -100)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
M.do_attack_animation(src)
visible_message("<span class='danger'>The [M.name] glomps [src]!</span>", \
"<span class='userdanger'>The [M.name] glomps [src]!</span>")
var/damage = rand(1, 3)
@@ -590,7 +610,7 @@
//Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable
/mob/living/carbon/human/proc/get_face_name()
var/datum/organ/external/head/head = get_organ("head")
if( !head || head.disfigured || (head.status & ORGAN_DESTROYED) || !real_name || (M_HUSK in mutations) ) //disfigured. use id-name if possible
if( !head || head.disfigured || (head.status & ORGAN_DESTROYED) || !real_name || (HUSK in mutations) ) //disfigured. use id-name if possible
return "Unknown"
return real_name
@@ -23,6 +23,7 @@
visible_message(text("\red [] has grabbed [] passively!", M, src))
if("harm")
M.do_attack_animation(src)
if (w_uniform)
w_uniform.add_fingerprint(M)
var/damage = rand(15, 30)
@@ -43,6 +44,7 @@
updatehealth()
if("disarm")
M.do_attack_animation(src)
var/randn = rand(1, 100)
if (randn <= 80)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
@@ -18,6 +18,7 @@
if((M != src) && check_shields(0, M.name))
add_logs(src, M, "attempted to touch")
M.do_attack_animation(src)
visible_message("\red <B>[M] attempted to touch [src]!</B>")
return 0
@@ -31,7 +32,7 @@
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
var/armor_block = run_armor_check(affecting, "melee")
if(M_HULK in M.mutations) damage += 5
if(HULK in M.mutations) damage += 5
playsound(loc, "punch", 25, 1, -1)
@@ -120,6 +121,7 @@
return
//end vampire codes
M.do_attack_animation(src)
add_logs(src, M, "[pick(attack.attack_verb)]ed")
if(!iscarbon(M))
@@ -137,7 +139,7 @@
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
var/armor_block = run_armor_check(affecting, "melee")
if(M_HULK in M.mutations) damage += 5
if(HULK in M.mutations) damage += 5
playsound(loc, attack.attack_sound, 25, 1, -1)
@@ -1,17 +1,18 @@
/mob/living/carbon/human/attack_paw(mob/M as mob)
/mob/living/carbon/human/attack_paw(mob/living/M as mob)
..()
if (M.a_intent == "help")
help_shake_act(M)
else
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
M.do_attack_animation(src)
if (M.is_muzzled())
return
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
"<span class='userdanger'>[M.name] bites [src]!</span>")
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
var/damage = rand(1, 3)
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone))
apply_damage(damage, BRUTE, affecting, run_armor_check(affecting, "melee"))
return
@@ -110,15 +110,15 @@
hud_updateflag |= 1 << HEALTH_HUD
/mob/living/carbon/human/Stun(amount)
if(M_HULK in mutations) return
if(HULK in mutations) return
..()
/mob/living/carbon/human/Weaken(amount)
if(M_HULK in mutations) return
if(HULK in mutations) return
..()
/mob/living/carbon/human/Paralyse(amount)
if(M_HULK in mutations) return
if(HULK in mutations) return
..()
@@ -242,8 +242,10 @@ emp_act
return 0
var/hit_area = affecting.display_name
if((user != src) && check_shields(I.force, "the [I.name]"))
return 0
if(user != src)
user.do_attack_animation(src)
if(check_shields(I.force, "the [I.name]"))
return 0
if(istype(I,/obj/item/weapon/card/emag))
emag_act(user, affecting)
@@ -11,7 +11,7 @@
if(embedded_flag)
handle_embedded_objects() //Moving with objects stuck in you can cause bad times.
if((M_RUN in mutations)) return -1
if((RUN in mutations)) return -1
var/health_deficiency = (100 - health + staminaloss)
if(health_deficiency >= 40)
@@ -55,12 +55,12 @@
tally += back.slowdown
if(M_FAT in src.mutations)
if(FAT in src.mutations)
tally += 1.5
if (bodytemperature < 283.222)
tally += (283.222 - bodytemperature) / 10 * 1.75
if(M_RUN in mutations)
if(RUN in mutations)
tally = 0
return (tally+config.human_delay)
+18 -22
View File
@@ -244,7 +244,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
var/x_offset = pixel_x + rand(-2,2) //Should probably be moved into the twitch emote at some point.
var/y_offset = pixel_y + rand(-1,1)
animate(src, pixel_x = pixel_x + x_offset, pixel_y = pixel_y + y_offset, time = 1)
animate(pixel_x = pixel_x - x_offset, pixel_y = pixel_y - y_offset, time = 1)
animate(pixel_x = initial(pixel_x) , pixel_y = initial(pixel_y), time = 1)
if (disabilities & NERVOUS)
speech_problem_flag = 1
if (prob(10))
@@ -303,7 +303,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
return
if(getFireLoss())
if((M_RESIST_HEAT in mutations) || (prob(1)))
if((RESIST_HEAT in mutations) || (prob(1)))
heal_organ_damage(0,1)
@@ -389,7 +389,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
proc/breathe()
if(reagents.has_reagent("lexorin")) return
if(M_NO_BREATH in mutations) return // No breath mutation means no breathing.
if(NO_BREATH in mutations) return // No breath mutation means no breathing.
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
if(species && (species.flags & NO_BREATHE)) return
@@ -618,7 +618,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
else if(adjusted_pressure >= species.hazard_low_pressure)
pressure_alert = -1
else
if( !(M_RESIST_COLD in mutations))
if( !(RESIST_COLD in mutations))
take_overall_damage(brute=LOW_PRESSURE_DAMAGE, used_weapon = "Low Pressure")
pressure_alert = -2
else
@@ -720,7 +720,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
var/thermal_protection_flags = get_heat_protection_flags(temperature)
var/thermal_protection = 0.0
if(M_RESIST_HEAT in mutations)
if(RESIST_HEAT in mutations)
return 1
if(thermal_protection_flags)
if(thermal_protection_flags & HEAD)
@@ -777,7 +777,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
proc/get_cold_protection(temperature)
if(M_RESIST_COLD in mutations)
if(RESIST_COLD in mutations)
return 1 //Fully protected from the cold.
temperature = max(temperature, 2.7) //There is an occasional bug where the temperature is miscalculated in ares with a small amount of gas on them, so this is necessary to ensure that that bug does not affect this calculation. Space's temperature is 2.7K and most suits that are intended to protect against any cold, protect down to 2.0K.
@@ -934,12 +934,12 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
else if (light_amount < 2) //heal in the dark
heal_overall_damage(1,1)
//The fucking M_FAT mutation is the greatest shit ever. It makes everyone so hot and bothered.
//The fucking FAT mutation is the greatest shit ever. It makes everyone so hot and bothered.
if(species.flags & CAN_BE_FAT)
if(M_FAT in mutations)
if(FAT in mutations)
if(overeatduration < 100)
src << "\blue You feel fit again!"
mutations.Remove(M_FAT)
mutations.Remove(FAT)
update_mutantrace(0)
update_mutations(0)
update_inv_w_uniform(0)
@@ -947,7 +947,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
else
if(overeatduration > 500)
src << "\red You suddenly feel blubbery!"
mutations.Add(M_FAT)
mutations.Add(FAT)
update_mutantrace(0)
update_mutations(0)
update_inv_w_uniform(0)
@@ -963,7 +963,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
else
if(overeatduration > 1)
if(M_OBESITY in mutations)
if(OBESITY in mutations)
overeatduration -= 1 // Those with obesity gene take twice as long to unfat
else
overeatduration -= 2
@@ -1006,7 +1006,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
silent = 0
else //ALIVE. LIGHTS ARE ON
if(M_REGEN in mutations)
if(REGEN in mutations)
if(nutrition)
if(prob(10))
var/randumb = rand(1,5)
@@ -1017,7 +1017,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
// Sobering multiplier.
// Sober block grants quadruple the alcohol metabolism.
// var/sober_str=!(M_SOBER in mutations)?1:4
// var/sober_str=!(SOBER in mutations)?1:4
updatehealth() //TODO
if(!in_stasis)
@@ -1046,11 +1046,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
adjustOxyLoss(1)*/
if(hallucination && !(species.flags & IS_SYNTHETIC))
if(hallucination >= 20)
if(prob(3))
fake_attack(src)
if(!handling_hal)
spawn handle_hallucinations() //The not boring kind!
spawn handle_hallucinations()
if(hallucination<=2)
hallucination = 0
@@ -1174,7 +1170,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
var/pixel_y_diff = rand(-amplitude/3, amplitude/3)
animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff , time = 2, loop = 6)
animate(pixel_x = pixel_x - pixel_x_diff, pixel_y = pixel_y - pixel_y_diff, time = 2)
animate(pixel_x = initial(pixel_x) , pixel_y = initial(pixel_y) , time = 2)
jitteriness = max(jitteriness-1, 0)
//Other
@@ -1298,7 +1294,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
see_in_dark = 8
if(!druggy) see_invisible = SEE_INVISIBLE_LEVEL_TWO
if(M_XRAY in mutations)
if(XRAY in mutations)
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
see_in_dark = 8
if(!druggy) see_invisible = SEE_INVISIBLE_LEVEL_TWO
@@ -1509,7 +1505,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
if(!machine.check_eye(src)) reset_view(null)
else
var/isRemoteObserve = 0
if((M_REMOTE_VIEW in mutations) && remoteview_target)
if((REMOTE_VIEW in mutations) && remoteview_target)
isRemoteObserve = 1
// Is he unconscious or dead?
if(remoteview_target.stat!=CONSCIOUS)
@@ -1517,7 +1513,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
isRemoteObserve = 0
// Does he have psy resist?
if(M_PSY_RESIST in remoteview_target.mutations)
if(PSY_RESIST in remoteview_target.mutations)
src << "\red Your mind is shut out!"
isRemoteObserve = 0
@@ -130,7 +130,7 @@
H.emote(pick("giggle", "laugh"))
SA.moles = 0
if( (abs(310.15 - breath.temperature) > 50) && !(M_RESIST_HEAT in H.mutations)) // Hot air hurts :(
if( (abs(310.15 - breath.temperature) > 50) && !(RESIST_HEAT in H.mutations)) // Hot air hurts :(
if(H.status_flags & GODMODE)
return 1 //godmode
if(breath.temperature < cold_level_1)
+2 -2
View File
@@ -286,7 +286,7 @@
handled = 1
if(message != "")
if((M_HULK in mutations) && health >= 25 && length(message))
if((HULK in mutations) && health >= 25 && length(message))
message = "[uppertext(message)]!!!"
verb = pick("yells","roars","hollers")
handled = 1
@@ -309,7 +309,7 @@
message = uppertext(message)
verb = "yells loudly"
if(M_COMIC in mutations)
if(COMIC in mutations)
message = "<span class='sans'>[message]</span>"
returns[1] = message
returns[2] = verb
@@ -236,9 +236,9 @@ proc/get_damage_icon_part(damage_state, body_part)
var/hulk_color_mod = rgb(48,224,40)
var/necrosis_color_mod = rgb(10,50,0)
var/husk = (M_HUSK in src.mutations) //100% unnecessary -Agouri //nope, do you really want to iterate through src.mutations repeatedly? -Pete
var/fat = (M_FAT in src.mutations)
var/hulk = (M_HULK in src.mutations)
var/husk = (HUSK in src.mutations) //100% unnecessary -Agouri //nope, do you really want to iterate through src.mutations repeatedly? -Pete
var/fat = (FAT in src.mutations)
var/hulk = (HULK in src.mutations)
var/g = (gender == FEMALE ? "f" : "m")
var/has_head = 0
@@ -456,7 +456,7 @@ proc/get_damage_icon_part(damage_state, body_part)
/mob/living/carbon/human/update_mutations(var/update_icons=1)
var/fat
if(M_FAT in mutations)
if(FAT in mutations)
fat = "fat"
var/image/standing = image("icon" = 'icons/effects/genetics.dmi')
@@ -475,26 +475,26 @@ proc/get_damage_icon_part(damage_state, body_part)
for(var/mut in mutations)
switch(mut)
/*
if(M_HULK)
if(HULK)
if(fat)
standing.underlays += "hulk_[fat]_s"
else
standing.underlays += "hulk_[g]_s"
add_image = 1
if(M_RESIST_COLD)
if(RESIST_COLD)
standing.underlays += "fire[fat]_s"
add_image = 1
if(M_RESIST_HEAT)
if(RESIST_HEAT)
standing.underlays += "cold[fat]_s"
add_image = 1
if(TK)
standing.underlays += "telekinesishead[fat]_s"
add_image = 1
*/
if(M_LASER)
if(LASER)
standing.overlays += "lasereyes_s"
add_image = 1
if((M_RESIST_COLD in mutations) && (M_RESIST_HEAT in mutations))
if((RESIST_COLD in mutations) && (RESIST_HEAT in mutations))
standing.underlays -= "cold[fat]_s"
standing.underlays -= "fire[fat]_s"
standing.underlays += "coldfire[fat]_s"
@@ -507,7 +507,7 @@ proc/get_damage_icon_part(damage_state, body_part)
/mob/living/carbon/human/proc/update_mutantrace(var/update_icons=1)
var/fat
if( M_FAT in mutations )
if( FAT in mutations )
fat = "fat"
// var/g = "m"
// if (gender == FEMALE) g = "f"
@@ -594,7 +594,7 @@ proc/get_damage_icon_part(damage_state, body_part)
if(!t_color) t_color = icon_state
var/image/standing = image("icon_state" = "[t_color]_s")
if(M_FAT in mutations)
if(FAT in mutations)
if(w_uniform.flags&ONESIZEFITSALL)
standing.icon = 'icons/mob/uniform_fat.dmi'
else
@@ -815,7 +815,7 @@ proc/get_damage_icon_part(damage_state, body_part)
standing = image("icon" = wear_suit.icon_override, "icon_state" = "[wear_suit.icon_state]")
else if(wear_suit.sprite_sheets && wear_suit.sprite_sheets[species.name])
standing = image("icon" = wear_suit.sprite_sheets[species.name], "icon_state" = "[wear_suit.icon_state]")
else if(M_FAT in mutations)
else if(FAT in mutations)
if(wear_suit.flags&ONESIZEFITSALL)
standing = image("icon" = 'icons/mob/suit_fat.dmi', "icon_state" = "[wear_suit.icon_state]")
else
@@ -255,7 +255,8 @@
if (Victim) return // can't attack while eating!
if (health > -100)
M.do_attack_animation(src)
visible_message("<span class='danger'> The [M.name] has glomped [src]!</span>", \
"<span class='userdanger'> The [M.name] has glomped [src]!</span>")
var/damage = rand(1, 3)
@@ -275,6 +276,7 @@
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
@@ -308,6 +310,7 @@
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
if (health > 0)
M.do_attack_animation(src)
attacked += 10
//playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M.name] has attacked [src]!</span>", \
@@ -316,7 +319,26 @@
updatehealth()
return
/mob/living/carbon/slime/attack_larva(mob/living/carbon/alien/larva/L as mob)
switch(L.a_intent)
if("help")
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
else
L.do_attack_animation(src)
attacked += 10
visible_message("<span class='danger'>[L] bites [src]!</span>", \
"<span class='userdanger'>[L] bites [src]!</span>")
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
if(stat != DEAD)
var/damage = rand(1, 3)
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
adjustBruteLoss(damage)
/mob/living/carbon/slime/attack_hand(mob/living/carbon/human/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
@@ -415,12 +437,12 @@
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
else
M.do_attack_animation(src)
var/damage = rand(1, 9)
attacked += 10
if (prob(90))
if (M_HULK in M.mutations)
if (HULK in M.mutations)
damage += 5
if(Victim || Target)
Victim = null
@@ -462,7 +484,7 @@
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
if ("harm")
M.do_attack_animation(src)
if (prob(95))
attacked += 10
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
@@ -496,6 +518,7 @@
visible_message("<span class='warning'> [M] has grabbed [name] passively!</span>")
if ("disarm")
M.do_attack_animation(src)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
var/damage = 5
attacked += 10
@@ -533,7 +556,7 @@
updatehealth()
return
/mob/living/carbon/slime/attackby(obj/item/W, mob/user)
/mob/living/carbon/slime/attackby(obj/item/W, mob/user, params)
if(istype(W,/obj/item/stack/sheet/mineral/plasma)) //Lets you feed slimes plasma.
if (user in Friends)
++Friends[user]
@@ -643,7 +666,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
var/Uses = 1 // uses before it goes inert
var/enhanced = 0 //has it been enhanced before?
attackby(obj/item/O as obj, mob/user as mob)
attackby(obj/item/O as obj, mob/user as mob, params)
if(istype(O, /obj/item/weapon/slimesteroid2))
if(enhanced == 1)
user << "<span class='warning'> This extract has already been enhanced!</span>"
@@ -958,7 +981,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE
armor = list(melee = 80, bullet = 20, laser = 20, energy = 10, bomb = 0, bio = 0, rad = 0)
/obj/effect/golem_rune
/obj/effect/goleRUNe
anchored = 1
desc = "a strange rune used to create golems. It glows when spirits are nearby."
name = "rune"
@@ -1118,7 +1141,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
if (environment.toxins > MOLES_PLASMA_VISIBLE)//plasma exposure causes the egg to hatch
src.Hatch()
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype( W, /obj/item/toy/crayon ))
return
else
@@ -9,7 +9,7 @@
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
var/muzzled = is_muzzled()
switch(act)
if ("me")
@@ -112,15 +112,15 @@
proc/handle_mutations_and_radiation()
if(getFireLoss())
if((M_RESIST_HEAT in mutations) || prob(50))
if((RESIST_HEAT in mutations) || prob(50))
switch(getFireLoss())
if(1 to 50)
adjustFireLoss(-1)
if(51 to 100)
adjustFireLoss(-5)
if ((M_HULK in mutations) && health <= 25)
mutations.Remove(M_HULK)
if ((HULK in mutations) && health <= 25)
mutations.Remove(HULK)
src << "\red You suddenly feel very weak."
Weaken(3)
emote("collapse")
@@ -421,7 +421,7 @@
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
pressure_alert = -1
else
if( !(M_RESIST_COLD in mutations) )
if( !(RESIST_COLD in mutations) )
adjustBruteLoss( LOW_PRESSURE_DAMAGE )
pressure_alert = -2
else
@@ -561,7 +561,7 @@
proc/handle_regular_hud_updates()
if (stat == 2 || (M_XRAY in mutations))
if (stat == 2 || (XRAY in mutations))
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
+80 -72
View File
@@ -131,7 +131,7 @@
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && (M_HULK in tmob.mutations))
if(istype(tmob, /mob/living/carbon/human) && (HULK in tmob.mutations))
if(prob(70))
usr << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
@@ -188,30 +188,47 @@
if ((O.icon_state == "flaming" && !( shielded )))
adjustFireLoss(40)
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
return
//mob/living/carbon/monkey/bullet_act(var/obj/item/projectile/Proj)taken care of in living
/mob/living/carbon/monkey/attack_paw(mob/M as mob)
return
/mob/living/carbon/monkey/attack_paw(mob/living/M as mob)
..()
if (M.a_intent == "help")
help_shake_act(M)
else
if ((M.a_intent == "harm" && !( istype(wear_mask, /obj/item/clothing/mask/muzzle) )))
if ((prob(75) && health > 0))
if (M.a_intent == "harm" && !(istype(src.wear_mask, /obj/item/clothing/mask/muzzle)))
M.do_attack_animation(src)
if (prob(75))
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M.name] has bit [name]!</B>", 1)
visible_message("<span class='danger'>[M.name] bites [name]!</span>", \
"<span class='userdanger'>[M.name] bites [name]!</span>")
var/damage = rand(1, 5)
adjustBruteLoss(damage)
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
if (health > -100)
adjustBruteLoss(damage)
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
else
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M.name] has attempted to bite [name]!</B>", 1)
visible_message("<span class='danger'>[M.name] has attempted to bite [name]!</span>", \
"<span class='userdanger'>[M.name] has attempted to bite [name]!</span>")
return
/mob/living/carbon/monkey/attack_larva(mob/living/carbon/alien/larva/L as mob)
switch(L.a_intent)
if("help")
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
else
L.do_attack_animation(src)
var/damage = rand(1, 3)
visible_message("<span class='danger'>[L] bites [src]!</span>", \
"<span class='userdanger'>[L] bites [src]!</span>")
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
if(stat != DEAD)
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
adjustBruteLoss(damage)
/mob/living/carbon/monkey/attack_hand(mob/living/carbon/human/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
@@ -221,33 +238,35 @@
M << "No attacking people at spawn, you jackass."
return
if(..()) //To allow surgery to return properly.
return
if (M.a_intent == "help")
help_shake_act(M)
else
if (M.a_intent == "harm")
if ((prob(75) && health > 0))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has punched [name]!</B>", M), 1)
M.do_attack_animation(src)
if (prob(75))
visible_message("<span class='danger'>[M] has punched [name]!</span>", \
"<span class='userdanger'>[M] has punched [name]!</span>")
playsound(loc, "punch", 25, 1, -1)
var/damage = rand(5, 10)
if (prob(40))
damage = rand(10, 15)
if (paralysis < 5)
if ( (paralysis < 5) && (health > 0) )
Paralyse(rand(10, 15))
spawn( 0 )
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has knocked out [name]!</B>", M), 1)
visible_message("<span class='danger'>[M] has knocked out [name]!</span>", \
"<span class='userdanger'>[M] has knocked out [name]!</span>")
return
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to punch [name]!</B>", M), 1)
visible_message("<span class='danger'>[M] has attempted to punch [name]!</span>", \
"<span class='userdanger'>[M] has attempted to punch [name]!</span>")
else
if (M.a_intent == "grab")
if (M == src || anchored)
@@ -257,28 +276,24 @@
M.put_in_active_hand(G)
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
visible_message("<span class='warning'>[M] has grabbed [name] passively!</span>")
else
if (!( paralysis ))
if (prob(25))
Paralyse(2)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has pushed down [name]!</B>", M), 1)
visible_message("<span class='danger'>[M] has pushed down [src]!</span>", \
"<span class='userdanger'>[M] has pushed down [src]!</span>")
else
if(drop_item())
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
visible_message("<span class='danger'>[M] has disarmed [src]!</span>", \
"<span class='userdanger'>[M] has disarmed [src]!</span>")
return
/mob/living/carbon/monkey/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
@@ -292,11 +307,10 @@
switch(M.a_intent)
if ("help")
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
visible_message("<span class='notice'> [M] caresses [src] with its scythe like arm.</span>")
if ("harm")
M.do_attack_animation(src)
if ((prob(95) && health > 0))
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
var/damage = rand(15, 30)
@@ -304,50 +318,45 @@
damage = rand(20, 40)
if (paralysis < 15)
Paralyse(rand(10, 15))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has wounded [name]!</B>", M), 1)
visible_message("<span class='danger'>[M] has wounded [name]!</span>", \
"<span class='userdanger'>[M] has wounded [name]!</span>")
else
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed [name]!</B>", M), 1)
adjustBruteLoss(damage)
updatehealth()
visible_message("<span class='danger'>[M] has slashed [name]!</span>", \
"<span class='userdanger'>[M] has slashed [name]!</span>")
if (stat != DEAD)
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to lunge at [name]!</B>", M), 1)
visible_message("<span class='danger'>[M] has attempted to lunge at [name]!</span>", \
"<span class='userdanger'>[M] has attempted to lunge at [name]!</span>")
if ("grab")
if (M == src)
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src )
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
M.put_in_active_hand(G)
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
visible_message("<span class='warning'>[M] has grabbed [name] passively!</span>")
if ("disarm")
M.do_attack_animation(src)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
var/damage = 5
if(prob(95))
Weaken(15)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down [name]!</B>", M), 1)
Weaken(10)
visible_message("<span class='danger'>[M] has tackled down [name]!</span>", \
"<span class='userdanger'>[M] has tackled down [name]!</span>")
else
if(drop_item())
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
visible_message("<span class='danger'>[M] has disarmed [name]!</span>", \
"<span class='userdanger'>[M] has disarmed [name]!</span>")
adjustBruteLoss(damage)
updatehealth()
return
@@ -356,12 +365,12 @@
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
"<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
add_logs(M, src, "attacked", admin=0)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
updatehealth()
@@ -376,9 +385,9 @@
if (health > -100)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
M.do_attack_animation(src)
visible_message("<span class='danger'>The [M.name] glomps [src]!</span>", \
"<span class='userdanger'>The [M.name] glomps [src]!</span>")
var/damage = rand(1, 3)
@@ -406,9 +415,8 @@
if(M.powerlevel < 0)
M.powerlevel = 0
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
visible_message("<span class='danger'>[M] shocked [src]!</span>", \
"<span class='userdanger'>[M] shocked [src]!</span>")
Weaken(power)
if (stuttering < power)
@@ -426,7 +434,7 @@
updatehealth()
return
/mob/living/carbon/monkey/Stat()
..()
statpanel("Status")
+4 -4
View File
@@ -208,7 +208,7 @@
spawn(0) H.emote(pick("giggle", "laugh"))
SA.moles = 0
if( (abs(310.15 - breath.temperature) > 50) && !(M_RESIST_HEAT in H.mutations)) // Hot air hurts :(
if( (abs(310.15 - breath.temperature) > 50) && !(RESIST_HEAT in H.mutations)) // Hot air hurts :(
if(H.status_flags & GODMODE) return 1 //godmode
if(breath.temperature < cold_level_1)
if(prob(20))
@@ -550,7 +550,7 @@
brute_mod = 1.25 //greys are fragile
default_genes = list(M_REMOTE_TALK)
default_genes = list(REMOTE_TALK)
primitive = /mob/living/carbon/monkey // TODO
@@ -559,11 +559,11 @@
/datum/species/grey/handle_dna(var/mob/living/carbon/C, var/remove)
if(!remove)
C.dna.SetSEState(REMOTETALKBLOCK,1,1)
C.mutations |= M_REMOTE_TALK
C.mutations |= REMOTE_TALK
genemutcheck(C,REMOTETALKBLOCK,null,MUTCHK_FORCED)
else
C.dna.SetSEState(REMOTETALKBLOCK,0,1)
C.mutations -= M_REMOTE_TALK
C.mutations -= REMOTE_TALK
genemutcheck(C,REMOTETALKBLOCK,null,MUTCHK_FORCED)
C.update_mutations()
..()
+1 -1
View File
@@ -15,7 +15,7 @@
if(BRUTE)
adjustBruteLoss(damage * blocked)
if(BURN)
if(M_RESIST_HEAT in mutations) damage = 0
if(RESIST_HEAT in mutations) damage = 0
adjustFireLoss(damage * blocked)
if(TOX)
adjustToxLoss(damage * blocked)
+44 -14
View File
@@ -47,9 +47,9 @@
/mob/living/proc/burn_skin(burn_amount)
if(istype(src, /mob/living/carbon/human))
//world << "DEBUG: burn_skin(), mutations=[mutations]"
if(M_NO_SHOCK in src.mutations) //shockproof
if(NO_SHOCK in src.mutations) //shockproof
return 0
if (M_RESIST_HEAT in src.mutations) //fireproof
if (RESIST_HEAT in src.mutations) //fireproof
return 0
var/mob/living/carbon/human/H = src //make this damage method divide the damage to be done among all the body parts, then burn each body part for that much damage. will have better effect then just randomly picking a body part
var/divided_damage = (burn_amount)/(H.organs.len)
@@ -61,7 +61,7 @@
H.updatehealth()
return 1
else if(istype(src, /mob/living/carbon/monkey))
if (M_RESIST_HEAT in src.mutations) //fireproof
if (RESIST_HEAT in src.mutations) //fireproof
return 0
var/mob/living/carbon/monkey/M = src
M.adjustFireLoss(burn_amount)
@@ -456,7 +456,7 @@
if(!isliving(usr) || usr.next_move > world.time)
return
usr.next_move = world.time + 20
usr.changeNext_move(CLICK_CD_RESIST)
var/mob/living/L = usr
@@ -539,8 +539,8 @@
if(iscarbon(L))
var/mob/living/carbon/C = L
if( C.handcuffed )
C.next_move = world.time + 100
C.last_special = world.time + 100
C.changeNext_move(CLICK_CD_BREAKOUT)
C.last_special = world.time + CLICK_CD_BREAKOUT
C << "\red You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)"
for(var/mob/O in viewers(L))
O.show_message("\red <B>[usr] attempts to unbuckle themself!</B>", 1)
@@ -573,8 +573,8 @@
// breakout_time++ //Harder to get out of welded lockers than locked lockers
//okay, so the closet is either welded or locked... resist!!!
usr.next_move = world.time + 100
L.last_special = world.time + 100
L.changeNext_move(CLICK_CD_BREAKOUT)
L.last_special = world.time + CLICK_CD_BREAKOUT
L << "\red You lean on the back of \the [C] and start pushing the door open. (this will take about [breakout_time] minutes)"
for(var/mob/O in viewers(usr.loc))
O.show_message("\red <B>The [L.loc] begins to shake violently!</B>", 1)
@@ -640,9 +640,9 @@
ExtinguishMob()
return
if(CM.handcuffed && CM.canmove && (CM.last_special <= world.time))
CM.next_move = world.time + 100
CM.last_special = world.time + 100
if(isalienadult(CM) || (M_HULK in usr.mutations))//Don't want to do a lot of logic gating here.
CM.changeNext_move(CLICK_CD_BREAKOUT)
CM.last_special = world.time + CLICK_CD_BREAKOUT
if(isalienadult(CM) || (HULK in usr.mutations))//Don't want to do a lot of logic gating here.
usr << "\red You attempt to break your handcuffs. (This will take around 5 seconds and you need to stand still)"
for(var/mob/O in viewers(CM))
O.show_message(text("\red <B>[] is trying to break the handcuffs!</B>", CM), 1)
@@ -677,9 +677,9 @@
CM.unEquip(CM.handcuffed)
else if(CM.legcuffed && CM.canmove && (CM.last_special <= world.time))
CM.next_move = world.time + 100
CM.last_special = world.time + 100
if(isalienadult(CM) || (M_HULK in usr.mutations))//Don't want to do a lot of logic gating here.
CM.changeNext_move(CLICK_CD_BREAKOUT)
CM.last_special = world.time + CLICK_CD_BREAKOUT
if(isalienadult(CM) || (HULK in usr.mutations))//Don't want to do a lot of logic gating here.
usr << "\red You attempt to break your legcuffs. (This will take around 5 seconds and you need to stand still)"
for(var/mob/O in viewers(CM))
O.show_message(text("\red <B>[] is trying to break the legcuffs!</B>", CM), 1)
@@ -761,3 +761,33 @@
/mob/living/proc/can_use_vents()
return "You can't fit into that vent."
/atom/movable/proc/do_attack_animation(atom/A)
var/pixel_x_diff = 0
var/pixel_y_diff = 0
var/direction = get_dir(src, A)
switch(direction)
if(NORTH)
pixel_y_diff = 8
if(SOUTH)
pixel_y_diff = -8
if(EAST)
pixel_x_diff = 8
if(WEST)
pixel_x_diff = -8
if(NORTHEAST)
pixel_x_diff = 8
pixel_y_diff = 8
if(NORTHWEST)
pixel_x_diff = -8
pixel_y_diff = 8
if(SOUTHEAST)
pixel_x_diff = 8
pixel_y_diff = -8
if(SOUTHWEST)
pixel_x_diff = -8
pixel_y_diff = -8
animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, time = 2)
animate(pixel_x = initial(pixel_x), pixel_y = initial(pixel_y), time = 2)

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