Linter diagnostics + bans non-var relative pathing

This commit is contained in:
MarinaGryphon
2021-06-20 18:16:45 -04:00
committed by VirgoBot
parent 79eefa9f83
commit 385fa640af
311 changed files with 11232 additions and 8984 deletions
+5 -14
View File
@@ -7,26 +7,17 @@
icon_state = "bodybag_folded"
w_class = ITEMSIZE_SMALL
attack_self(mob/user)
var/obj/structure/closet/body_bag/R = new /obj/structure/closet/body_bag(user.loc)
R.add_fingerprint(user)
qdel(src)
/obj/item/bodybag/attack_self(mob/user)
var/obj/structure/closet/body_bag/R = new /obj/structure/closet/body_bag(user.loc)
R.add_fingerprint(user)
qdel(src)
/obj/item/weapon/storage/box/bodybags
name = "body bags"
desc = "This box contains body bags."
icon_state = "bodybags"
New()
..()
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
starts_with = list(/obj/item/bodybag = 7)
/obj/structure/closet/body_bag
name = "body bag"
@@ -134,7 +134,7 @@
if(choice)
var/obj/item/device/communicator/chosen_communicator = choice
var/mob/observer/dead/O = src
var/text_message = sanitize(input(src, "What do you want the message to say?")) as message
var/text_message = sanitize(input(src, "What do you want the message to say?") as message)
if(text_message && O.exonet)
O.exonet.send_message(chosen_communicator.exonet.address, "text", text_message)
@@ -28,13 +28,6 @@ GLOBAL_LIST_BOILERPLATE(all_beacons, /obj/item/device/radio/beacon)
src.add_fingerprint(usr)
return
/obj/item/device/radio/beacon/bacon //Probably a better way of doing this, I'm lazy.
proc/digest_delay()
spawn(600)
qdel(src)
// SINGULO BEACON SPAWNER
/obj/item/device/radio/beacon/syndicate
+8 -8
View File
@@ -67,10 +67,10 @@
icon_state = "healthhud"
icon = 'icons/obj/clothing/glasses.dmi'
New()
..()
hud = new /obj/item/clothing/glasses/hud/health(src)
return
/obj/item/borg/sight/hud/med/New()
..()
hud = new /obj/item/clothing/glasses/hud/health(src)
return
/obj/item/borg/sight/hud/sec
@@ -78,7 +78,7 @@
icon_state = "securityhud"
icon = 'icons/obj/clothing/glasses.dmi'
New()
..()
hud = new /obj/item/clothing/glasses/hud/security(src)
return
/obj/item/borg/sight/hud/sec/New()
..()
hud = new /obj/item/clothing/glasses/hud/security(src)
return
+83 -27
View File
@@ -9,6 +9,7 @@
var/icon/virtualIcon
var/list/bulletholes = list()
<<<<<<< HEAD
Destroy()
// if a target is deleted and associated with a stake, force stake to forget
for(var/obj/structure/target_stake/T in view(3,src))
@@ -62,22 +63,77 @@
to_chat(user, "You take the target out of the stake.")
else
src.loc = get_turf(user)
=======
/obj/item/target/Destroy()
// if a target is deleted and associated with a stake, force stake to forget
for(var/obj/structure/target_stake/T in view(3,src))
if(T.pinned_target == src)
T.pinned_target = null
T.density = 1
break
..() // delete target
/obj/item/target/Moved(atom/old_loc, direction, forced = FALSE)
. = ..()
// After target moves, check for nearby stakes. If associated, move to target
for(var/obj/structure/target_stake/M in view(3,src))
if(M.density == 0 && M.pinned_target == src)
M.forceMove(loc)
// This may seem a little counter-intuitive but I assure you that's for a purpose.
// Stakes are the ones that carry targets, yes, but in the stake code we set
// a stake's density to 0 meaning it can't be pushed anymore. Instead of pushing
// the stake now, we have to push the target.
/obj/item/target/attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
overlays.Cut()
to_chat(usr, "You slice off [src]'s uneven chunks of aluminum and scorch marks.")
return
/obj/item/target/attack_hand(mob/user as mob)
// taking pinned targets off!
var/obj/structure/target_stake/stake
for(var/obj/structure/target_stake/T in view(3,src))
if(T.pinned_target == src)
stake = T
break
if(stake)
if(stake.pinned_target)
stake.density = 1
density = 0
layer = OBJ_LAYER
loc = user.loc
if(ishuman(user))
if(!user.get_active_hand())
user.put_in_hands(src)
>>>>>>> 593246b... Linter diagnostics + bans non-var relative pathing (#8150)
to_chat(user, "You take the target out of the stake.")
else
src.loc = get_turf(user)
to_chat(user, "You take the target out of the stake.")
stake.pinned_target = null
return
stake.pinned_target = null
return
else
..()
else
..()
syndicate
icon_state = "target_s"
desc = "A shooting target that looks like a hostile agent."
hp = 2600 // i guess syndie targets are sturdier?
alien
icon_state = "target_q"
desc = "A shooting target with a threatening silhouette."
hp = 2350 // alium onest too kinda
/obj/item/target/syndicate
icon_state = "target_s"
desc = "A shooting target that looks like a hostile agent."
hp = 2600 // i guess syndie targets are sturdier?
/obj/item/target/alien
icon_state = "target_q"
desc = "A shooting target with a threatening silhouette."
hp = 2350 // alium onest too kinda
/obj/item/target/bullet_act(var/obj/item/projectile/Proj)
var/p_x = Proj.p_x + pick(0,0,0,0,0,-1,1) // really ugly way of coding "sometimes offset Proj.p_x!"
@@ -160,21 +216,21 @@
var/b2y1 = 0
var/b2y2 = 0
New(var/obj/item/target/Target, var/pixel_x = 0, var/pixel_y = 0)
if(!Target) return
/datum/bullethole/New(var/obj/item/target/Target, var/pixel_x = 0, var/pixel_y = 0)
if(!Target) return
// Randomize the first box
b1x1 = pixel_x - pick(1,1,1,1,2,2,3,3,4)
b1x2 = pixel_x + pick(1,1,1,1,2,2,3,3,4)
b1y = pixel_y
if(prob(35))
b1y += rand(-4,4)
// Randomize the first box
b1x1 = pixel_x - pick(1,1,1,1,2,2,3,3,4)
b1x2 = pixel_x + pick(1,1,1,1,2,2,3,3,4)
b1y = pixel_y
if(prob(35))
b1y += rand(-4,4)
// Randomize the second box
b2x = pixel_x
if(prob(35))
b2x += rand(-4,4)
b2y1 = pixel_y + pick(1,1,1,1,2,2,3,3,4)
b2y2 = pixel_y - pick(1,1,1,1,2,2,3,3,4)
// Randomize the second box
b2x = pixel_x
if(prob(35))
b2x += rand(-4,4)
b2y1 = pixel_y + pick(1,1,1,1,2,2,3,3,4)
b2y2 = pixel_y - pick(1,1,1,1,2,2,3,3,4)
Target.bulletholes.Add(src)
Target.bulletholes.Add(src)
+93 -93
View File
@@ -164,90 +164,90 @@
var/bullets = 5
drop_sound = 'sound/items/drop/gun.ogg'
examine(mob/user)
. = ..()
if(bullets && get_dist(user, src) <= 2)
. += "<span class='notice'>It is loaded with [bullets] foam darts!</span>"
/obj/item/toy/crossbow/examine(mob/user)
. = ..()
if(bullets && get_dist(user, src) <= 2)
. += "<span class='notice'>It is loaded with [bullets] foam darts!</span>"
attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/toy/ammo/crossbow))
if(bullets <= 4)
user.drop_item()
qdel(I)
bullets++
to_chat(user, "<span class='notice'>You load the foam dart into the crossbow.</span>")
else
to_chat(usr, "<span class='warning'>It's already fully loaded.</span>")
/obj/item/toy/crossbow/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/toy/ammo/crossbow))
if(bullets <= 4)
user.drop_item()
qdel(I)
bullets++
to_chat(user, "<span class='notice'>You load the foam dart into the crossbow.</span>")
else
to_chat(usr, "<span class='warning'>It's already fully loaded.</span>")
afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
if(!isturf(target.loc) || target == user) return
if(flag) return
/obj/item/toy/crossbow/afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
if(!isturf(target.loc) || target == user) return
if(flag) return
if (locate (/obj/structure/table, src.loc))
return
else if (bullets)
var/turf/trg = get_turf(target)
var/obj/effect/foam_dart_dummy/D = new/obj/effect/foam_dart_dummy(get_turf(src))
bullets--
D.icon_state = "foamdart"
D.name = "foam dart"
playsound(src, 'sound/items/syringeproj.ogg', 50, 1)
if (locate (/obj/structure/table, src.loc))
return
else if (bullets)
var/turf/trg = get_turf(target)
var/obj/effect/foam_dart_dummy/D = new/obj/effect/foam_dart_dummy(get_turf(src))
bullets--
D.icon_state = "foamdart"
D.name = "foam dart"
playsound(src, 'sound/items/syringeproj.ogg', 50, 1)
for(var/i=0, i<6, i++)
if (D)
if(D.loc == trg) break
step_towards(D,trg)
for(var/i=0, i<6, i++)
if (D)
if(D.loc == trg) break
step_towards(D,trg)
for(var/mob/living/M in D.loc)
if(!istype(M,/mob/living)) continue
if(M == user) continue
for(var/mob/O in viewers(world.view, D))
O.show_message(text("<span class='warning'>\The [] was hit by the foam dart!</span>", M), 1)
new /obj/item/toy/ammo/crossbow(M.loc)
qdel(D)
return
for(var/atom/A in D.loc)
if(A == user) continue
if(A.density)
new /obj/item/toy/ammo/crossbow(A.loc)
qdel(D)
sleep(1)
spawn(10)
if(D)
new /obj/item/toy/ammo/crossbow(D.loc)
for(var/mob/living/M in D.loc)
if(!istype(M,/mob/living)) continue
if(M == user) continue
for(var/mob/O in viewers(world.view, D))
O.show_message(text("<span class='warning'>\The [] was hit by the foam dart!</span>", M), 1)
new /obj/item/toy/ammo/crossbow(M.loc)
qdel(D)
return
return
else if (bullets == 0)
user.Weaken(5)
for(var/mob/O in viewers(world.view, user))
O.show_message(text("<span class='warning'>\The [] realized they were out of ammo and starting scrounging for some!</span>", user), 1)
for(var/atom/A in D.loc)
if(A == user) continue
if(A.density)
new /obj/item/toy/ammo/crossbow(A.loc)
qdel(D)
sleep(1)
spawn(10)
if(D)
new /obj/item/toy/ammo/crossbow(D.loc)
qdel(D)
return
else if (bullets == 0)
user.Weaken(5)
for(var/mob/O in viewers(world.view, user))
O.show_message(text("<span class='warning'>\The [] realized they were out of ammo and starting scrounging for some!</span>", user), 1)
attack(mob/M as mob, mob/user as mob)
src.add_fingerprint(user)
/obj/item/toy/crossbow/attack(mob/M as mob, mob/user as mob)
src.add_fingerprint(user)
// ******* Check
if (src.bullets > 0 && M.lying)
if (src.bullets > 0 && M.lying)
for(var/mob/O in viewers(M, null))
if(O.client)
O.show_message(text("<span class='danger'>\The [] casually lines up a shot with []'s head and pulls the trigger!</span>", user, M), 1, "<span class='warning'>You hear the sound of foam against skull</span>", 2)
O.show_message(text("<span class='warning'>\The [] was hit in the head by the foam dart!</span>", M), 1)
for(var/mob/O in viewers(M, null))
if(O.client)
O.show_message(text("<span class='danger'>\The [] casually lines up a shot with []'s head and pulls the trigger!</span>", user, M), 1, "<span class='warning'>You hear the sound of foam against skull</span>", 2)
O.show_message(text("<span class='warning'>\The [] was hit in the head by the foam dart!</span>", M), 1)
playsound(src, 'sound/items/syringeproj.ogg', 50, 1)
new /obj/item/toy/ammo/crossbow(M.loc)
src.bullets--
else if (M.lying && src.bullets == 0)
for(var/mob/O in viewers(M, null))
if (O.client) O.show_message(text("<span class='danger'>\The [] casually lines up a shot with []'s head, pulls the trigger, then realizes they are out of ammo and drops to the floor in search of some!</span>", user, M), 1, "<span class='warning'>You hear someone fall</span>", 2)
user.Weaken(5)
return
playsound(src, 'sound/items/syringeproj.ogg', 50, 1)
new /obj/item/toy/ammo/crossbow(M.loc)
src.bullets--
else if (M.lying && src.bullets == 0)
for(var/mob/O in viewers(M, null))
if (O.client) O.show_message(text("<span class='danger'>\The [] casually lines up a shot with []'s head, pulls the trigger, then realizes they are out of ammo and drops to the floor in search of some!</span>", user, M), 1, "<span class='warning'>You hear someone fall</span>", 2)
user.Weaken(5)
return
/obj/item/toy/ammo/crossbow
name = "foam dart"
@@ -285,21 +285,21 @@
w_class = ITEMSIZE_SMALL
attack_verb = list("attacked", "struck", "hit")
attack_self(mob/user as mob)
src.active = !( src.active )
if (src.active)
to_chat(user, "<span class='notice'>You extend the plastic blade with a quick flick of your wrist.</span>")
playsound(src, 'sound/weapons/saberon.ogg', 50, 1)
src.item_state = "[icon_state]_blade"
src.w_class = ITEMSIZE_LARGE
else
to_chat(user, "<span class='notice'>You push the plastic blade back down into the handle.</span>")
playsound(src, 'sound/weapons/saberoff.ogg', 50, 1)
src.item_state = "[icon_state]"
src.w_class = ITEMSIZE_SMALL
update_icon()
src.add_fingerprint(user)
return
/obj/item/toy/sword/attack_self(mob/user as mob)
src.active = !( src.active )
if (src.active)
to_chat(user, "<span class='notice'>You extend the plastic blade with a quick flick of your wrist.</span>")
playsound(src, 'sound/weapons/saberon.ogg', 50, 1)
src.item_state = "[icon_state]_blade"
src.w_class = ITEMSIZE_LARGE
else
to_chat(user, "<span class='notice'>You push the plastic blade back down into the handle.</span>")
playsound(src, 'sound/weapons/saberoff.ogg', 50, 1)
src.item_state = "[icon_state]"
src.w_class = ITEMSIZE_SMALL
update_icon()
src.add_fingerprint(user)
return
/obj/item/toy/sword/update_icon()
. = ..()
@@ -365,15 +365,15 @@
w_class = ITEMSIZE_TINY
drop_sound = null
throw_impact(atom/hit_atom)
..()
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
new /obj/effect/decal/cleanable/ash(src.loc)
src.visible_message("<span class='warning'>The [src.name] explodes!</span>","<span class='warning'>You hear a snap!</span>")
playsound(src, 'sound/effects/snap.ogg', 50, 1)
qdel(src)
/obj/item/toy/snappop/throw_impact(atom/hit_atom)
..()
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
new /obj/effect/decal/cleanable/ash(src.loc)
src.visible_message("<span class='warning'>The [src.name] explodes!</span>","<span class='warning'>You hear a snap!</span>")
playsound(src, 'sound/effects/snap.ogg', 50, 1)
qdel(src)
/obj/item/toy/snappop/Crossed(atom/movable/H as mob|obj)
if(H.is_incorporeal())
+8 -8
View File
@@ -30,14 +30,14 @@
var/hits = 0
var/time_inflicted = 0
proc/copy()
var/datum/autopsy_data/W = new()
W.weapon = weapon
W.pretend_weapon = pretend_weapon
W.damage = damage
W.hits = hits
W.time_inflicted = time_inflicted
return W
/datum/autopsy_data/proc/copy()
var/datum/autopsy_data/W = new()
W.weapon = weapon
W.pretend_weapon = pretend_weapon
W.damage = damage
W.hits = hits
W.time_inflicted = time_inflicted
return W
/obj/item/weapon/autopsy_scanner/proc/add_data(var/obj/item/organ/external/O)
if(!O.autopsy_data.len && !O.trace_chemicals.len) return
+5 -2
View File
@@ -25,7 +25,7 @@
if(wrapped)
add_overlay("[initial(icon_state)]_wrapper")
obj/item/clothing/mask/chewable/Initialize()
/obj/item/clothing/mask/chewable/Initialize()
. = ..()
flags |= NOREACT // so it doesn't react until you light it
create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15
@@ -47,7 +47,7 @@ obj/item/clothing/mask/chewable/Initialize()
STOP_PROCESSING(SSprocessing, src)
..()
obj/item/clothing/mask/chewable/Destroy()
/obj/item/clothing/mask/chewable/Destroy()
. = ..()
STOP_PROCESSING(SSprocessing, src)
@@ -135,6 +135,9 @@ obj/item/clothing/mask/chewable/Destroy()
throwforce = 2
slot_flags = SLOT_BELT
starts_with = list(/obj/item/clothing/mask/chewable/tobacco = 6)
/obj/item/weapon/storage/chewables/Initialize()
. = ..()
make_exact_fit()
//Tobacco Tins
@@ -578,10 +578,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
deactivation_sound = 'sound/items/zippo_off.ogg'
/obj/item/weapon/flame/lighter/random
New()
icon_state = "lighter-[pick("r","c","y","g")]"
item_state = icon_state
base_state = icon_state
/obj/item/weapon/flame/lighter/random/New()
icon_state = "lighter-[pick("r","c","y","g")]"
item_state = icon_state
base_state = icon_state
/obj/item/weapon/flame/lighter/attack_self(mob/living/user)
if(!base_state)
@@ -2,7 +2,7 @@
#error T_BOARD macro is not defined but we need it!
#endif
obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/circuitboard/rdserver
name = T_BOARD("R&D server")
build_path = /obj/machinery/r_n_d/server/core
board_type = new /datum/frame/frame_types/machine
@@ -11,7 +11,7 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/stack/cable_coil = 2,
/obj/item/weapon/stock_parts/scanning_module = 1)
obj/item/weapon/circuitboard/rdserver/attackby(obj/item/I as obj, mob/user as mob)
/obj/item/weapon/circuitboard/rdserver/attackby(obj/item/I as obj, mob/user as mob)
if(I.is_screwdriver())
playsound(src, I.usesound, 50, 1)
user.visible_message("<span class='notice'>\The [user] adjusts the jumper on \the [src]'s access protocol pins.</span>", "<span class='notice'>You adjust the jumper on the access protocol pins.</span>")
+175 -197
View File
@@ -141,262 +141,240 @@
desc = "This will make you big and strong, but give you a bad skin condition."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = HULKBLOCK
..()
/obj/item/weapon/dnainjector/hulkmut/New()
block = HULKBLOCK
..()
/obj/item/weapon/dnainjector/antihulk
name = "\improper DNA injector (Anti-Hulk)"
desc = "Cures green skin."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = HULKBLOCK
..()
/obj/item/weapon/dnainjector/antihulk/New()
block = HULKBLOCK
..()
/obj/item/weapon/dnainjector/xraymut
name = "\improper DNA injector (Xray)"
desc = "Finally you can see what the Site Manager does."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 8
New()
block = XRAYBLOCK
..()
/obj/item/weapon/dnainjector/xraymut/New()
block = XRAYBLOCK
..()
/obj/item/weapon/dnainjector/antixray
name = "\improper DNA injector (Anti-Xray)"
desc = "It will make you see harder."
datatype = DNA2_BUF_SE
value = 0x001
//block = 8
New()
block = XRAYBLOCK
..()
/obj/item/weapon/dnainjector/antixray/New()
block = XRAYBLOCK
..()
/obj/item/weapon/dnainjector/firemut
name = "\improper DNA injector (Fire)"
desc = "Gives you fire."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 10
New()
block = FIREBLOCK
..()
/obj/item/weapon/dnainjector/firemut/New()
block = FIREBLOCK
..()
/obj/item/weapon/dnainjector/antifire
name = "\improper DNA injector (Anti-Fire)"
desc = "Cures fire."
datatype = DNA2_BUF_SE
value = 0x001
//block = 10
New()
block = FIREBLOCK
..()
/obj/item/weapon/dnainjector/antifire/New()
block = FIREBLOCK
..()
/obj/item/weapon/dnainjector/telemut
name = "\improper DNA injector (Tele.)"
desc = "Super brain man!"
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 12
New()
block = TELEBLOCK
..()
/obj/item/weapon/dnainjector/telemut/New()
block = TELEBLOCK
..()
/obj/item/weapon/dnainjector/antitele
name = "\improper DNA injector (Anti-Tele.)"
desc = "Will make you not able to control your mind."
datatype = DNA2_BUF_SE
value = 0x001
//block = 12
New()
block = TELEBLOCK
..()
/obj/item/weapon/dnainjector/antitele/New()
block = TELEBLOCK
..()
/obj/item/weapon/dnainjector/nobreath
name = "\improper DNA injector (No Breath)"
desc = "Hold your breath and count to infinity."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = NOBREATHBLOCK
..()
/obj/item/weapon/dnainjector/nobreath/New()
block = NOBREATHBLOCK
..()
/obj/item/weapon/dnainjector/antinobreath
name = "\improper DNA injector (Anti-No Breath)"
desc = "Hold your breath and count to 100."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = NOBREATHBLOCK
..()
/obj/item/weapon/dnainjector/antinobreath/New()
block = NOBREATHBLOCK
..()
/obj/item/weapon/dnainjector/remoteview
name = "\improper DNA injector (Remote View)"
desc = "Stare into the distance for a reason."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = REMOTEVIEWBLOCK
..()
/obj/item/weapon/dnainjector/remoteview/New()
block = REMOTEVIEWBLOCK
..()
/obj/item/weapon/dnainjector/antiremoteview
name = "\improper DNA injector (Anti-Remote View)"
desc = "Cures green skin."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = REMOTEVIEWBLOCK
..()
/obj/item/weapon/dnainjector/antiremoteview/New()
block = REMOTEVIEWBLOCK
..()
/obj/item/weapon/dnainjector/regenerate
name = "\improper DNA injector (Regeneration)"
desc = "Healthy but hungry."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = REGENERATEBLOCK
..()
/obj/item/weapon/dnainjector/regenerate/New()
block = REGENERATEBLOCK
..()
/obj/item/weapon/dnainjector/antiregenerate
name = "\improper DNA injector (Anti-Regeneration)"
desc = "Sickly but sated."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = REGENERATEBLOCK
..()
/obj/item/weapon/dnainjector/antiregenerate/New()
block = REGENERATEBLOCK
..()
/obj/item/weapon/dnainjector/runfast
name = "\improper DNA injector (Increase Run)"
desc = "Running Man."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = INCREASERUNBLOCK
..()
/obj/item/weapon/dnainjector/runfast/New()
block = INCREASERUNBLOCK
..()
/obj/item/weapon/dnainjector/antirunfast
name = "\improper DNA injector (Anti-Increase Run)"
desc = "Walking Man."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = INCREASERUNBLOCK
..()
/obj/item/weapon/dnainjector/antirunfast/New()
block = INCREASERUNBLOCK
..()
/obj/item/weapon/dnainjector/morph
name = "\improper DNA injector (Morph)"
desc = "A total makeover."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = MORPHBLOCK
..()
/obj/item/weapon/dnainjector/morph/New()
block = MORPHBLOCK
..()
/obj/item/weapon/dnainjector/antimorph
name = "\improper DNA injector (Anti-Morph)"
desc = "Cures identity crisis."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = MORPHBLOCK
..()
/* No COLDBLOCK on bay
/obj/item/weapon/dnainjector/cold
name = "\improper DNA injector (Cold)"
desc = "Feels a bit chilly."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = COLDBLOCK
..()
/obj/item/weapon/dnainjector/anticold
name = "\improper DNA injector (Anti-Cold)"
desc = "Feels room-temperature."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = COLDBLOCK
..()
*/
/obj/item/weapon/dnainjector/antimorph/New()
block = MORPHBLOCK
..()
/obj/item/weapon/dnainjector/noprints
name = "\improper DNA injector (No Prints)"
desc = "Better than a pair of budget insulated gloves."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = NOPRINTSBLOCK
..()
/obj/item/weapon/dnainjector/noprints/New()
block = NOPRINTSBLOCK
..()
/obj/item/weapon/dnainjector/antinoprints
name = "\improper DNA injector (Anti-No Prints)"
desc = "Not quite as good as a pair of budget insulated gloves."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = NOPRINTSBLOCK
..()
/obj/item/weapon/dnainjector/antinoprints/New()
block = NOPRINTSBLOCK
..()
/obj/item/weapon/dnainjector/insulation
name = "\improper DNA injector (Shock Immunity)"
desc = "Better than a pair of real insulated gloves."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = SHOCKIMMUNITYBLOCK
..()
/obj/item/weapon/dnainjector/insulation/New()
block = SHOCKIMMUNITYBLOCK
..()
/obj/item/weapon/dnainjector/antiinsulation
name = "\improper DNA injector (Anti-Shock Immunity)"
desc = "Not quite as good as a pair of real insulated gloves."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = SHOCKIMMUNITYBLOCK
..()
/obj/item/weapon/dnainjector/antiinsulation/New()
block = SHOCKIMMUNITYBLOCK
..()
/obj/item/weapon/dnainjector/midgit
name = "\improper DNA injector (Small Size)"
desc = "Makes you shrink."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = SMALLSIZEBLOCK
..()
/obj/item/weapon/dnainjector/midgit/New()
block = SMALLSIZEBLOCK
..()
/obj/item/weapon/dnainjector/antimidgit
name = "\improper DNA injector (Anti-Small Size)"
desc = "Makes you grow. But not too much."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = SMALLSIZEBLOCK
..()
/obj/item/weapon/dnainjector/antimidgit/New()
block = SMALLSIZEBLOCK
..()
/////////////////////////////////////
/obj/item/weapon/dnainjector/antiglasses
@@ -404,197 +382,197 @@
desc = "Toss away those glasses!"
datatype = DNA2_BUF_SE
value = 0x001
//block = 1
New()
block = GLASSESBLOCK
..()
/obj/item/weapon/dnainjector/antiglasses/New()
block = GLASSESBLOCK
..()
/obj/item/weapon/dnainjector/glassesmut
name = "\improper DNA injector (Glasses)"
desc = "Will make you need dorkish glasses."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 1
New()
block = GLASSESBLOCK
..()
/obj/item/weapon/dnainjector/glassesmut/New()
block = GLASSESBLOCK
..()
/obj/item/weapon/dnainjector/epimut
name = "\improper DNA injector (Epi.)"
desc = "Shake shake shake the room!"
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 3
New()
block = HEADACHEBLOCK
..()
/obj/item/weapon/dnainjector/epimut/New()
block = HEADACHEBLOCK
..()
/obj/item/weapon/dnainjector/antiepi
name = "\improper DNA injector (Anti-Epi.)"
desc = "Will fix you up from shaking the room."
datatype = DNA2_BUF_SE
value = 0x001
//block = 3
New()
block = HEADACHEBLOCK
..()
/obj/item/weapon/dnainjector/antiepi/New()
block = HEADACHEBLOCK
..()
/obj/item/weapon/dnainjector/anticough
name = "\improper DNA injector (Anti-Cough)"
desc = "Will stop that awful noise."
datatype = DNA2_BUF_SE
value = 0x001
//block = 5
New()
block = COUGHBLOCK
..()
/obj/item/weapon/dnainjector/anticough/New()
block = COUGHBLOCK
..()
/obj/item/weapon/dnainjector/coughmut
name = "\improper DNA injector (Cough)"
desc = "Will bring forth a sound of horror from your throat."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 5
New()
block = COUGHBLOCK
..()
/obj/item/weapon/dnainjector/coughmut/New()
block = COUGHBLOCK
..()
/obj/item/weapon/dnainjector/clumsymut
name = "\improper DNA injector (Clumsy)"
desc = "Makes clumsy minions."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 6
New()
block = CLUMSYBLOCK
..()
/obj/item/weapon/dnainjector/clumsymut/New()
block = CLUMSYBLOCK
..()
/obj/item/weapon/dnainjector/anticlumsy
name = "\improper DNA injector (Anti-Clumy)"
desc = "Cleans up confusion."
datatype = DNA2_BUF_SE
value = 0x001
//block = 6
New()
block = CLUMSYBLOCK
..()
/obj/item/weapon/dnainjector/anticlumsy/New()
block = CLUMSYBLOCK
..()
/obj/item/weapon/dnainjector/antitour
name = "\improper DNA injector (Anti-Tour.)"
desc = "Will cure tourrets."
datatype = DNA2_BUF_SE
value = 0x001
//block = 7
New()
block = TWITCHBLOCK
..()
/obj/item/weapon/dnainjector/antitour/New()
block = TWITCHBLOCK
..()
/obj/item/weapon/dnainjector/tourmut
name = "\improper DNA injector (Tour.)"
desc = "Gives you a nasty case off tourrets."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 7
New()
block = TWITCHBLOCK
..()
/obj/item/weapon/dnainjector/tourmut/New()
block = TWITCHBLOCK
..()
/obj/item/weapon/dnainjector/stuttmut
name = "\improper DNA injector (Stutt.)"
desc = "Makes you s-s-stuttterrr"
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 9
New()
block = NERVOUSBLOCK
..()
/obj/item/weapon/dnainjector/stuttmut/New()
block = NERVOUSBLOCK
..()
/obj/item/weapon/dnainjector/antistutt
name = "\improper DNA injector (Anti-Stutt.)"
desc = "Fixes that speaking impairment."
datatype = DNA2_BUF_SE
value = 0x001
//block = 9
New()
block = NERVOUSBLOCK
..()
/obj/item/weapon/dnainjector/antistutt/New()
block = NERVOUSBLOCK
..()
/obj/item/weapon/dnainjector/blindmut
name = "\improper DNA injector (Blind)"
desc = "Makes you not see anything."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 11
New()
block = BLINDBLOCK
..()
/obj/item/weapon/dnainjector/blindmut/New()
block = BLINDBLOCK
..()
/obj/item/weapon/dnainjector/antiblind
name = "\improper DNA injector (Anti-Blind)"
desc = "ITS A MIRACLE!!!"
datatype = DNA2_BUF_SE
value = 0x001
//block = 11
New()
block = BLINDBLOCK
..()
/obj/item/weapon/dnainjector/antiblind/New()
block = BLINDBLOCK
..()
/obj/item/weapon/dnainjector/deafmut
name = "\improper DNA injector (Deaf)"
desc = "Sorry, what did you say?"
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 13
New()
block = DEAFBLOCK
..()
/obj/item/weapon/dnainjector/deafmut/New()
block = DEAFBLOCK
..()
/obj/item/weapon/dnainjector/antideaf
name = "\improper DNA injector (Anti-Deaf)"
desc = "Will make you hear once more."
datatype = DNA2_BUF_SE
value = 0x001
//block = 13
New()
block = DEAFBLOCK
..()
/obj/item/weapon/dnainjector/antideaf/New()
block = DEAFBLOCK
..()
/obj/item/weapon/dnainjector/hallucination
name = "\improper DNA injector (Halluctination)"
desc = "What you see isn't always what you get."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = HALLUCINATIONBLOCK
..()
/obj/item/weapon/dnainjector/hallucination/New()
block = HALLUCINATIONBLOCK
..()
/obj/item/weapon/dnainjector/antihallucination
name = "\improper DNA injector (Anti-Hallucination)"
desc = "What you see is what you get."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = HALLUCINATIONBLOCK
..()
/obj/item/weapon/dnainjector/antihallucination/New()
block = HALLUCINATIONBLOCK
..()
/obj/item/weapon/dnainjector/h2m
name = "\improper DNA injector (Human > Monkey)"
desc = "Will make you a flea bag."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 14
New()
block = MONKEYBLOCK
..()
/obj/item/weapon/dnainjector/h2m/New()
block = MONKEYBLOCK
..()
/obj/item/weapon/dnainjector/m2h
name = "\improper DNA injector (Monkey > Human)"
desc = "Will make you...less hairy."
datatype = DNA2_BUF_SE
value = 0x001
//block = 14
New()
block = MONKEYBLOCK
..()
/obj/item/weapon/dnainjector/m2h/New()
block = MONKEYBLOCK
..()
@@ -19,152 +19,144 @@
var/mob/living/carbon/occupant = null
var/injecting = 0
proc
go_out()
put_mob(mob/living/carbon/M as mob)
implant(var/mob/M)
add_implants()
/obj/machinery/implantchair/New()
..()
add_implants()
New()
..()
add_implants()
/obj/machinery/implantchair/attack_hand(mob/user as mob)
user.set_machine(src)
var/health_text = ""
if(src.occupant)
if(src.occupant.health <= -100)
health_text = "<FONT color=red>Dead</FONT>"
else if(src.occupant.health < 0)
health_text = "<FONT color=red>[round(src.occupant.health,0.1)]</FONT>"
else
health_text = "[round(src.occupant.health,0.1)]"
var/dat ="<B>Implanter Status</B><BR>"
dat +="<B>Current occupant:</B> [src.occupant ? "<BR>Name: [src.occupant]<BR>Health: [health_text]<BR>" : "<FONT color=red>None</FONT>"]<BR>"
dat += "<B>Implants:</B> [src.implant_list.len ? "[implant_list.len]" : "<A href='?src=\ref[src];replenish=1'>Replenish</A>"]<BR>"
if(src.occupant)
dat += "[src.ready ? "<A href='?src=\ref[src];implant=1'>Implant</A>" : "Recharging"]<BR>"
user.set_machine(src)
user << browse(dat, "window=implant")
onclose(user, "implant")
attack_hand(mob/user as mob)
user.set_machine(src)
var/health_text = ""
if(src.occupant)
if(src.occupant.health <= -100)
health_text = "<FONT color=red>Dead</FONT>"
else if(src.occupant.health < 0)
health_text = "<FONT color=red>[round(src.occupant.health,0.1)]</FONT>"
else
health_text = "[round(src.occupant.health,0.1)]"
var/dat ="<B>Implanter Status</B><BR>"
dat +="<B>Current occupant:</B> [src.occupant ? "<BR>Name: [src.occupant]<BR>Health: [health_text]<BR>" : "<FONT color=red>None</FONT>"]<BR>"
dat += "<B>Implants:</B> [src.implant_list.len ? "[implant_list.len]" : "<A href='?src=\ref[src];replenish=1'>Replenish</A>"]<BR>"
if(src.occupant)
dat += "[src.ready ? "<A href='?src=\ref[src];implant=1'>Implant</A>" : "Recharging"]<BR>"
user.set_machine(src)
user << browse(dat, "window=implant")
onclose(user, "implant")
Topic(href, href_list)
if((get_dist(src, usr) <= 1) || istype(usr, /mob/living/silicon/ai))
if(href_list["implant"])
if(src.occupant)
injecting = 1
go_out()
ready = 0
spawn(injection_cooldown)
ready = 1
if(href_list["replenish"])
/obj/machinery/implantchair/Topic(href, href_list)
if((get_dist(src, usr) <= 1) || istype(usr, /mob/living/silicon/ai))
if(href_list["implant"])
if(src.occupant)
injecting = 1
go_out()
ready = 0
spawn(replenish_cooldown)
add_implants()
spawn(injection_cooldown)
ready = 1
src.updateUsrDialog()
src.add_fingerprint(usr)
return
if(href_list["replenish"])
ready = 0
spawn(replenish_cooldown)
add_implants()
ready = 1
attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
if(istype(G, /obj/item/weapon/grab))
var/obj/item/weapon/grab/grab = G
if(!ismob(grab.affecting))
return
if(grab.affecting.has_buckled_mobs())
to_chat(user, span("warning", "\The [grab.affecting] has other entities attached to them. Remove them first."))
return
var/mob/M = grab.affecting
if(put_mob(M))
qdel(G)
src.updateUsrDialog()
return
go_out(var/mob/M)
if(!( src.occupant ))
return
if(M == occupant) // so that the guy inside can't eject himself -Agouri
return
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.loc = src.loc
if(injecting)
implant(src.occupant)
injecting = 0
src.occupant = null
icon_state = "implantchair"
return
put_mob(mob/living/carbon/M as mob)
if(!iscarbon(M))
to_chat(usr, "<span class='warning'>\The [src] cannot hold this!</span>")
return
if(src.occupant)
to_chat(usr, "<span class='warning'>\The [src] is already occupied!</span>")
return
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.stop_pulling()
M.loc = src
src.occupant = M
src.add_fingerprint(usr)
icon_state = "implantchair_on"
return 1
implant(var/mob/M)
if (!istype(M, /mob/living/carbon))
return
if(!implant_list.len) return
for(var/obj/item/weapon/implant/loyalty/imp in implant_list)
if(!imp) continue
if(istype(imp, /obj/item/weapon/implant/loyalty))
for (var/mob/O in viewers(M, null))
O.show_message("<span class='warning'>\The [M] has been implanted by \the [src].</span>", 1)
if(imp.handle_implant(M, BP_TORSO))
imp.post_implant(M)
implant_list -= imp
break
return
add_implants()
for(var/i=0, i<src.max_implants, i++)
var/obj/item/weapon/implant/loyalty/I = new /obj/item/weapon/implant/loyalty(src)
implant_list += I
/obj/machinery/implantchair/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
if(istype(G, /obj/item/weapon/grab))
var/obj/item/weapon/grab/grab = G
if(!ismob(grab.affecting))
return
if(grab.affecting.has_buckled_mobs())
to_chat(user, span("warning", "\The [grab.affecting] has other entities attached to them. Remove them first."))
return
var/mob/M = grab.affecting
if(put_mob(M))
qdel(G)
src.updateUsrDialog()
return
/obj/machinery/implantchair/proc/go_out(var/mob/M)
if(!( src.occupant ))
return
verb
get_out()
set name = "Eject occupant"
set category = "Object"
set src in oview(1)
if(usr.stat != 0)
return
src.go_out(usr)
add_fingerprint(usr)
return
if(M == occupant) // so that the guy inside can't eject himself -Agouri
return
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.loc = src.loc
if(injecting)
implant(src.occupant)
injecting = 0
src.occupant = null
icon_state = "implantchair"
return
move_inside()
set name = "Move Inside"
set category = "Object"
set src in oview(1)
if(usr.stat != 0 || stat & (NOPOWER|BROKEN))
return
put_mob(usr)
return
/obj/machinery/implantchair/proc/put_mob(mob/living/carbon/M as mob)
if(!iscarbon(M))
to_chat(usr, "<span class='warning'>\The [src] cannot hold this!</span>")
return
if(src.occupant)
to_chat(usr, "<span class='warning'>\The [src] is already occupied!</span>")
return
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.stop_pulling()
M.loc = src
src.occupant = M
src.add_fingerprint(usr)
icon_state = "implantchair_on"
return 1
/obj/machinery/implantchair/proc/implant(var/mob/M)
if (!istype(M, /mob/living/carbon))
return
if(!implant_list.len) return
for(var/obj/item/weapon/implant/loyalty/imp in implant_list)
if(!imp) continue
if(istype(imp, /obj/item/weapon/implant/loyalty))
for (var/mob/O in viewers(M, null))
O.show_message("<span class='warning'>\The [M] has been implanted by \the [src].</span>", 1)
if(imp.handle_implant(M, BP_TORSO))
imp.post_implant(M)
implant_list -= imp
break
return
/obj/machinery/implantchair/proc/add_implants()
for(var/i=0, i<src.max_implants, i++)
var/obj/item/weapon/implant/loyalty/I = new /obj/item/weapon/implant/loyalty(src)
implant_list += I
return
/obj/machinery/implantchair/verb/get_out()
set name = "Eject occupant"
set category = "Object"
set src in oview(1)
if(usr.stat != 0)
return
src.go_out(usr)
add_fingerprint(usr)
return
/obj/machinery/implantchair/verb/move_inside()
set name = "Move Inside"
set category = "Object"
set src in oview(1)
if(usr.stat != 0 || stat & (NOPOWER|BROKEN))
return
put_mob(usr)
return
@@ -12,87 +12,83 @@
var/obj/item/weapon/implantcase/case = null
var/broadcasting = null
var/listening = 1.0
proc
/obj/item/weapon/implantpad/proc/update()
if (src.case)
src.icon_state = "implantpad-1"
else
src.icon_state = "implantpad-0"
return
/obj/item/weapon/implantpad/attack_hand(mob/living/user as mob)
if ((src.case && user.item_is_in_hands(src)))
user.put_in_active_hand(case)
src.case.add_fingerprint(user)
src.case = null
src.add_fingerprint(user)
update()
else
return ..()
return
update()
if (src.case)
src.icon_state = "implantpad-1"
else
src.icon_state = "implantpad-0"
/obj/item/weapon/implantpad/attackby(obj/item/weapon/implantcase/C as obj, mob/user as mob)
..()
if(istype(C, /obj/item/weapon/implantcase))
if(!( src.case ))
user.drop_item()
C.loc = src
src.case = C
else
return
src.update()
return
attack_hand(mob/living/user as mob)
if ((src.case && user.item_is_in_hands(src)))
user.put_in_active_hand(case)
src.case.add_fingerprint(user)
src.case = null
src.add_fingerprint(user)
update()
/obj/item/weapon/implantpad/attack_self(mob/user as mob)
user.set_machine(src)
var/dat = "<B>Implant Mini-Computer:</B><HR>"
if (src.case)
if(src.case.imp)
if(istype(src.case.imp, /obj/item/weapon/implant))
dat += src.case.imp.get_data()
if(istype(src.case.imp, /obj/item/weapon/implant/tracking))
dat += {"ID (1-100):
<A href='byond://?src=\ref[src];tracking_id=-10'>-</A>
<A href='byond://?src=\ref[src];tracking_id=-1'>-</A> [case.imp:id]
<A href='byond://?src=\ref[src];tracking_id=1'>+</A>
<A href='byond://?src=\ref[src];tracking_id=10'>+</A><BR>"}
else
return ..()
dat += "The implant casing is empty."
else
dat += "Please insert an implant casing!"
user << browse(dat, "window=implantpad")
onclose(user, "implantpad")
return
/obj/item/weapon/implantpad/Topic(href, href_list)
..()
if (usr.stat)
return
if ((usr.contents.Find(src)) || ((in_range(src, usr) && istype(src.loc, /turf))))
usr.set_machine(src)
if (href_list["tracking_id"])
var/obj/item/weapon/implant/tracking/T = src.case.imp
T.id += text2num(href_list["tracking_id"])
T.id = min(1000, T.id)
T.id = max(1, T.id)
attackby(obj/item/weapon/implantcase/C as obj, mob/user as mob)
..()
if(istype(C, /obj/item/weapon/implantcase))
if(!( src.case ))
user.drop_item()
C.loc = src
src.case = C
if (istype(src.loc, /mob))
attack_self(src.loc)
else
return
src.update()
return
attack_self(mob/user as mob)
user.set_machine(src)
var/dat = "<B>Implant Mini-Computer:</B><HR>"
if (src.case)
if(src.case.imp)
if(istype(src.case.imp, /obj/item/weapon/implant))
dat += src.case.imp.get_data()
if(istype(src.case.imp, /obj/item/weapon/implant/tracking))
dat += {"ID (1-100):
<A href='byond://?src=\ref[src];tracking_id=-10'>-</A>
<A href='byond://?src=\ref[src];tracking_id=-1'>-</A> [case.imp:id]
<A href='byond://?src=\ref[src];tracking_id=1'>+</A>
<A href='byond://?src=\ref[src];tracking_id=10'>+</A><BR>"}
else
dat += "The implant casing is empty."
else
dat += "Please insert an implant casing!"
user << browse(dat, "window=implantpad")
onclose(user, "implantpad")
return
Topic(href, href_list)
..()
if (usr.stat)
return
if ((usr.contents.Find(src)) || ((in_range(src, usr) && istype(src.loc, /turf))))
usr.set_machine(src)
if (href_list["tracking_id"])
var/obj/item/weapon/implant/tracking/T = src.case.imp
T.id += text2num(href_list["tracking_id"])
T.id = min(1000, T.id)
T.id = max(1, T.id)
if (istype(src.loc, /mob))
attack_self(src.loc)
else
for(var/mob/M in viewers(1, src))
if (M.client)
src.attack_self(M)
src.add_fingerprint(usr)
else
usr << browse(null, "window=implantpad")
return
for(var/mob/M in viewers(1, src))
if (M.client)
src.attack_self(M)
src.add_fingerprint(usr)
else
usr << browse(null, "window=implantpad")
return
return
@@ -1,4 +1,4 @@
obj/item/weapon/chainsaw
/obj/item/weapon/chainsaw
name = "chainsaw"
desc = "Vroom vroom."
icon_state = "chainsaw0"
@@ -12,7 +12,7 @@ obj/item/weapon/chainsaw
var/active_force = 55
var/inactive_force = 10
obj/item/weapon/chainsaw/New()
/obj/item/weapon/chainsaw/New()
var/datum/reagents/R = new/datum/reagents(max_fuel)
reagents = R
R.my_atom = src
@@ -20,13 +20,13 @@ obj/item/weapon/chainsaw/New()
START_PROCESSING(SSobj, src)
..()
obj/item/weapon/chainsaw/Destroy()
/obj/item/weapon/chainsaw/Destroy()
STOP_PROCESSING(SSobj, src)
if(reagents)
qdel(reagents)
..()
obj/item/weapon/chainsaw/proc/turnOn(mob/user as mob)
/obj/item/weapon/chainsaw/proc/turnOn(mob/user as mob)
if(on) return
visible_message("You start pulling the string on \the [src].", "[usr] starts pulling the string on the [src].")
@@ -49,7 +49,7 @@ obj/item/weapon/chainsaw/proc/turnOn(mob/user as mob)
else
to_chat(user, "You fumble with the string.")
obj/item/weapon/chainsaw/proc/turnOff(mob/user as mob)
/obj/item/weapon/chainsaw/proc/turnOff(mob/user as mob)
if(!on) return
to_chat(user, "You switch the gas nozzle on the chainsaw, turning it off.")
attack_verb = list("bluntly hit", "beat", "knocked")
@@ -60,13 +60,13 @@ obj/item/weapon/chainsaw/proc/turnOff(mob/user as mob)
on = 0
update_icon()
obj/item/weapon/chainsaw/attack_self(mob/user as mob)
/obj/item/weapon/chainsaw/attack_self(mob/user as mob)
if(!on)
turnOn(user)
else
turnOff(user)
obj/item/weapon/chainsaw/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
/obj/item/weapon/chainsaw/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
if(!proximity) return
..()
if(on)
@@ -98,7 +98,7 @@ obj/item/weapon/chainsaw/afterattack(atom/A as mob|obj|turf|area, mob/user as mo
else
to_chat(user, "<span class='notice'>Don't move while you're refilling the chainsaw.</span>")
obj/item/weapon/chainsaw/process()
/obj/item/weapon/chainsaw/process()
if(!on) return
if(on)
@@ -109,20 +109,20 @@ obj/item/weapon/chainsaw/process()
to_chat(usr, "\The [src] sputters to a stop!")
turnOff()
obj/item/weapon/chainsaw/proc/get_fuel()
/obj/item/weapon/chainsaw/proc/get_fuel()
return reagents.get_reagent_amount("fuel")
obj/item/weapon/chainsaw/examine(mob/user)
/obj/item/weapon/chainsaw/examine(mob/user)
. = ..()
if(max_fuel && get_dist(user, src) == 0)
. += "<span class = 'notice'>The [src] feels like it contains roughtly [get_fuel()] units of fuel left.</span>"
obj/item/weapon/chainsaw/suicide_act(mob/user)
/obj/item/weapon/chainsaw/suicide_act(mob/user)
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
to_chat(viewers(user), "<span class='danger'>[user] is lying down and pulling the chainsaw into [TU.him], it looks like [TU.he] [TU.is] trying to commit suicide!</span>")
return(BRUTELOSS)
obj/item/weapon/chainsaw/update_icon()
/obj/item/weapon/chainsaw/update_icon()
if(on)
icon_state = "chainsaw1"
item_state = "chainsaw1"
+41 -41
View File
@@ -18,53 +18,53 @@ var/global/list/cached_icons = list()
flags = OPENCONTAINER
var/paint_type = "red"
afterattack(turf/simulated/target, mob/user, proximity)
if(!proximity) return
if(istype(target) && reagents.total_volume > 5)
user.visible_message("<span class='warning'>\The [target] has been splashed with something by [user]!</span>")
reagents.trans_to_turf(target, 5)
else
return ..()
/obj/item/weapon/reagent_containers/glass/paint/afterattack(turf/simulated/target, mob/user, proximity)
if(!proximity) return
if(istype(target) && reagents.total_volume > 5)
user.visible_message("<span class='warning'>\The [target] has been splashed with something by [user]!</span>")
reagents.trans_to_turf(target, 5)
else
return ..()
New()
if(paint_type && length(paint_type) > 0)
name = paint_type + " " + name
..()
reagents.add_reagent("water", volume*3/5)
reagents.add_reagent("plasticide", volume/5)
if(paint_type == "white") //why don't white crayons exist
reagents.add_reagent("aluminum", volume/5)
else if (paint_type == "black")
reagents.add_reagent("carbon", volume/5)
else
reagents.add_reagent("marker_ink_[paint_type]", volume/5)
reagents.handle_reactions()
/obj/item/weapon/reagent_containers/glass/paint/New()
if(paint_type && length(paint_type) > 0)
name = paint_type + " " + name
..()
reagents.add_reagent("water", volume*3/5)
reagents.add_reagent("plasticide", volume/5)
if(paint_type == "white") //why don't white crayons exist
reagents.add_reagent("aluminum", volume/5)
else if (paint_type == "black")
reagents.add_reagent("carbon", volume/5)
else
reagents.add_reagent("marker_ink_[paint_type]", volume/5)
reagents.handle_reactions()
red
icon_state = "paint_red"
paint_type = "red"
/obj/item/weapon/reagent_containers/glass/paint/red
icon_state = "paint_red"
paint_type = "red"
yellow
icon_state = "paint_yellow"
paint_type = "yellow"
/obj/item/weapon/reagent_containers/glass/paint/yellow
icon_state = "paint_yellow"
paint_type = "yellow"
green
icon_state = "paint_green"
paint_type = "green"
/obj/item/weapon/reagent_containers/glass/paint/green
icon_state = "paint_green"
paint_type = "green"
blue
icon_state = "paint_blue"
paint_type = "blue"
/obj/item/weapon/reagent_containers/glass/paint/blue
icon_state = "paint_blue"
paint_type = "blue"
purple
icon_state = "paint_violet"
paint_type = "purple"
/obj/item/weapon/reagent_containers/glass/paint/purple
icon_state = "paint_violet"
paint_type = "purple"
black
icon_state = "paint_black"
paint_type = "black"
/obj/item/weapon/reagent_containers/glass/paint/black
icon_state = "paint_black"
paint_type = "black"
white
icon_state = "paint_white"
paint_type = "white"
/obj/item/weapon/reagent_containers/glass/paint/white
icon_state = "paint_white"
paint_type = "white"
@@ -17,44 +17,44 @@
var/icon_broken = "lockbox+b"
attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/card/id))
if(src.broken)
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
/obj/item/weapon/storage/lockbox/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/card/id))
if(src.broken)
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
return
if(src.allowed(user))
src.locked = !( src.locked )
if(src.locked)
src.icon_state = src.icon_locked
to_chat(user, "<span class='notice'>You lock \the [src]!</span>")
close_all()
return
if(src.allowed(user))
src.locked = !( src.locked )
if(src.locked)
src.icon_state = src.icon_locked
to_chat(user, "<span class='notice'>You lock \the [src]!</span>")
close_all()
return
else
src.icon_state = src.icon_closed
to_chat(user, "<span class='notice'>You unlock \the [src]!</span>")
return
else
to_chat(user, "<span class='warning'>Access Denied</span>")
else if(istype(W, /obj/item/weapon/melee/energy/blade))
if(emag_act(INFINITY, user, W, "The locker has been sliced open by [user] with an energy blade!", "You hear metal being sliced and sparks flying."))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src, "sparks", 50, 1)
if(!locked)
..()
src.icon_state = src.icon_closed
to_chat(user, "<span class='notice'>You unlock \the [src]!</span>")
return
else
to_chat(user, "<span class='warning'>It's locked!</span>")
return
to_chat(user, "<span class='warning'>Access Denied</span>")
else if(istype(W, /obj/item/weapon/melee/energy/blade))
if(emag_act(INFINITY, user, W, "The locker has been sliced open by [user] with an energy blade!", "You hear metal being sliced and sparks flying."))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src, "sparks", 50, 1)
if(!locked)
..()
else
to_chat(user, "<span class='warning'>It's locked!</span>")
return
show_to(mob/user as mob)
if(locked)
to_chat(user, "<span class='warning'>It's locked!</span>")
else
..()
return
/obj/item/weapon/storage/lockbox/show_to(mob/user as mob)
if(locked)
to_chat(user, "<span class='warning'>It's locked!</span>")
else
..()
return
/obj/item/weapon/storage/lockbox/emag_act(var/remaining_charges, var/mob/user, var/emag_source, var/visual_feedback = "", var/audible_feedback = "")
if(!broken)
@@ -269,11 +269,11 @@
var/obj/item/sample_object
var/number
New(obj/item/sample as obj)
if(!istype(sample))
qdel(src)
sample_object = sample
number = 1
/datum/numbered_display/New(obj/item/sample as obj)
if(!istype(sample))
qdel(src)
sample_object = sample
number = 1
//This proc determins the size of the inventory to be displayed. Please touch it only if you know what you're doing.
/obj/item/weapon/storage/proc/orient2hud(mob/user as mob)
@@ -84,11 +84,11 @@
attack_verb = list("drilled")
drop_sound = 'sound/items/drop/accessory.ogg'
suicide_act(mob/user)
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
to_chat(viewers(user),pick("<span class='danger'>\The [user] is pressing \the [src] to [TU.his] temple and activating it! It looks like [TU.hes] trying to commit suicide.</span>",
"<span class='danger'>\The [user] is pressing \the [src] to [TU.his] chest and activating it! It looks like [TU.hes] trying to commit suicide.</span>"))
return (BRUTELOSS)
/obj/item/weapon/surgical/surgicaldrill/suicide_act(mob/user)
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
to_chat(viewers(user),pick("<span class='danger'>\The [user] is pressing \the [src] to [TU.his] temple and activating it! It looks like [TU.hes] trying to commit suicide.</span>",
"<span class='danger'>\The [user] is pressing \the [src] to [TU.his] chest and activating it! It looks like [TU.hes] trying to commit suicide.</span>"))
return (BRUTELOSS)
/*
* Scalpel
@@ -110,12 +110,12 @@
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
drop_sound = 'sound/items/drop/knife.ogg'
suicide_act(mob/user)
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
to_chat(viewers(user),pick("<span class='danger'>\The [user] is slitting [TU.his] wrists with the [src.name]! It looks like [TU.hes] trying to commit suicide.</span>", \
"<span class='danger'>\The [user] is slitting [TU.his] throat with the [src.name]! It looks like [TU.hes] trying to commit suicide.</span>", \
"<span class='danger'>\The [user] is slitting [TU.his] stomach open with the [src.name]! It looks like [TU.hes] trying to commit seppuku.</span>"))
return (BRUTELOSS)
/obj/item/weapon/surgical/scalpel/suicide_act(mob/user)
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
to_chat(viewers(user),pick("<span class='danger'>\The [user] is slitting [TU.his] wrists with the [src.name]! It looks like [TU.hes] trying to commit suicide.</span>", \
"<span class='danger'>\The [user] is slitting [TU.his] throat with the [src.name]! It looks like [TU.hes] trying to commit suicide.</span>", \
"<span class='danger'>\The [user] is slitting [TU.his] stomach open with the [src.name]! It looks like [TU.hes] trying to commit seppuku.</span>"))
return (BRUTELOSS)
/*
* Researchable Scalpels
@@ -1,5 +1,3 @@
#define TANK_MAX_RELEASE_PRESSURE (3*ONE_ATMOSPHERE)
#define TANK_DEFAULT_RELEASE_PRESSURE 21
#define TANK_IDEAL_PRESSURE 1015 //Arbitrary.
var/list/global/tank_gauge_cache = list()
+4 -4
View File
@@ -12,10 +12,10 @@
drop_sound = 'sound/items/drop/sword.ogg'
pickup_sound = 'sound/items/pickup/sword.ogg'
suicide_act(mob/user)
var/datum/gender/T = gender_datums[user.get_visible_gender()]
to_chat(viewers(user),"<span class='danger'>[user] is impaling [T.himself] with the [src.name]! It looks like [T.he] [T.is] trying to commit suicide.</span>")
return (BRUTELOSS|FIRELOSS)
/obj/item/weapon/nullrod/suicide_act(mob/user)
var/datum/gender/T = gender_datums[user.get_visible_gender()]
to_chat(viewers(user),"<span class='danger'>[user] is impaling [T.himself] with the [src.name]! It looks like [T.he] [T.is] trying to commit suicide.</span>")
return (BRUTELOSS|FIRELOSS)
/obj/item/weapon/nullrod/attack(mob/M as mob, mob/living/user as mob) //Paste from old-code to decult with a null rod.