Merge tgstation13 r4570 into bs12_with_tgport

Conflicts:
	baystation12.dme
	code/defines/obj.dm
	code/defines/procs/helpers.dm
	code/defines/turf.dm
	code/game/gamemodes/changeling/modularchangling.dm
	code/game/gamemodes/cult/cult_structures.dm
	code/game/gamemodes/events.dm
	code/game/machinery/telecomms/machine_interactions.dm
	code/game/master_controller.dm
	code/game/objects/items/blueprints.dm
	code/game/objects/items/devices/uplinks.dm
	code/game/objects/items/item.dm
	code/game/objects/items/weapons/gift_wrappaper.dm
	code/game/objects/items/weapons/wires.dm
	code/game/objects/weapons.dm
	code/game/turfs/turf.dm
	code/modules/clothing/head/hardhat.dm
	code/modules/mining/mine_items.dm
	code/modules/mining/mine_turfs.dm
	code/modules/mob/living/silicon/robot/life.dm
	code/modules/mob/mob_defines.dm
	code/modules/mob/new_player/login.dm
	code/modules/paperwork/pen.dm
	code/modules/paperwork/stamps.dm
	code/unused/toilets.dm
	html/changelog.html
	icons/effects/alert.dmi

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2012-08-28 19:57:11 +10:00
269 changed files with 14389 additions and 13349 deletions
@@ -0,0 +1,14 @@
/obj/item/weapon/bedsheet/ex_act(severity)
if (severity <= 2)
del(src)
return
return
/obj/item/weapon/bedsheet/attack_self(mob/user as mob)
user.drop_item()
if(layer == initial(layer))
layer = 5
else
layer = initial(layer)
add_fingerprint(user)
return
+21 -42
View File
@@ -1,17 +1,16 @@
/* Cards
* Contains:
* DATA CARD
* ID CARD
* FINGERPRINT CARD HOLDER
* FINGERPRINT CARD
*/
/*
CONTAINS:
DATA CARD
ID CARD
FINGERPRINT CARD HOLDER
FINGERPRINT CARD
*/
// DATA CARDS
* DATA CARDS - Used for the teleporter
*/
/obj/item/weapon/card/data/verb/label(t as text)
set name = "Label Disk"
set category = "Object"
@@ -25,10 +24,9 @@ FINGERPRINT CARD
return
// ID CARDS
/*
* ID CARDS
*/
/obj/item/weapon/card/id/attack_self(mob/user as mob)
for(var/mob/O in viewers(user, null))
O.show_message(text("[] shows you: \icon[] []: assignment: []", user, src, src.name, src.assignment), 1)
@@ -73,8 +71,9 @@ FINGERPRINT CARD
..()
// FINGERPRINT HOLDER
/*
* FINGERPRINT HOLDER
*/
/obj/item/weapon/fcardholder/attack_self(mob/user as mob)
var/dat = "<B>Clipboard</B><BR>"
for(var/obj/item/weapon/f_card/P in src)
@@ -168,10 +167,9 @@ FINGERPRINT CARD
// FINGERPRINT CARD
/*
* FINGERPRINT CARD
*/
/obj/item/weapon/f_card/examine()
set src in view(2)
@@ -191,25 +189,6 @@ FINGERPRINT CARD
return dat
return
/*
/obj/item/weapon/f_card/attack_hand(mob/user as mob)
if ((user.r_hand == src || user.l_hand == src))
src.add_fingerprint(user)
var/obj/item/weapon/f_card/F = new /obj/item/weapon/f_card( user )
F.amount = 1
src.amount--
user.put_in_hands(F)
F.add_fingerprint(user)
if (src.amount < 1)
//SN src = null
del(src)
return
else
..()
return
*/
/obj/item/weapon/f_card/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/f_card))
@@ -106,9 +106,6 @@ ZIPPO
if(M.lit > 0)
light("\red [user] lights their [name] with their [W].")
else if(istype(W, /obj/item/device/assembly/igniter))
light("\red [user] fiddles with [W], and manages to light their [name].")
//can't think of any other way to update the overlays :<
user.update_inv_wear_mask(0)
user.update_inv_l_hand(0)
@@ -456,7 +453,7 @@ ZIPPO
for(var/mob/O in viewers(user, null))
O.show_message("\red After a few attempts, [user] manages to light the [src], they however burn their finger in the process.", 1)
user.total_luminosity += 2
user.SetLuminosity(user.luminosity + 2)
processing_objects.Add(src)
else
src.lit = 0
@@ -469,7 +466,7 @@ ZIPPO
for(var/mob/O in viewers(user, null))
O.show_message("\red [user] quietly shuts off the [src].", 1)
user.total_luminosity -= 2
user.SetLuminosity(user.luminosity - 2)
processing_objects.Remove(src)
else
return ..()
@@ -498,13 +495,13 @@ ZIPPO
pickup(mob/user)
if(lit)
src.sd_SetLuminosity(0)
user.total_luminosity += 2
src.SetLuminosity(0)
user.SetLuminosity(user.luminosity+2)
return
dropped(mob/user)
if(lit)
user.total_luminosity -= 2
src.sd_SetLuminosity(2)
user.SetLuminosity(user.luminosity-2)
src.SetLuminosity(2)
return
+15 -8
View File
@@ -1,12 +1,13 @@
/* Clown Items
* Contains:
* Banana Peels
* Soap
* Bike Horns
*/
/*
CONTAINS:
NO MORE BANANA, NOW YOU CAN EAT IT. GO SEE OTHER FOOD STUFFS.
BANANA PEEL
SOAP
BIKE HORN
*/
* Banana Peals
*/
/obj/item/weapon/bananapeel/HasEntered(AM as mob|obj)
if (istype(AM, /mob/living/carbon))
var/mob/M = AM
@@ -19,6 +20,9 @@ BIKE HORN
M.Stun(4)
M.Weaken(2)
/*
* Soap
*/
/obj/item/weapon/soap/HasEntered(AM as mob|obj) //EXACTLY the same as bananapeel for now, so it makes sense to put it in the same dm -- Urist
if (istype(AM, /mob/living/carbon))
var/mob/M = AM
@@ -50,6 +54,9 @@ BIKE HORN
return
..()
/*
* Bike Horns
*/
/obj/item/weapon/bikehorn/attack_self(mob/user as mob)
if (spam_flag == 0)
spam_flag = 1
+27
View File
@@ -0,0 +1,27 @@
/obj/item/weapon/dice
name = "d6"
desc = "A dice with six sides."
var/sides = 6
icon = 'icons/obj/dice.dmi'
icon_state = "d66"
/obj/item/weapon/dice/New()
icon_state = "[name][rand(sides)]"
/obj/item/weapon/dice/d20
name = "d20"
desc = "A dice with twenty sides."
sides = 20
icon_state = "d2020"
/obj/item/weapon/dice/attack_self(mob/user as mob)
var/result = rand(1, sides)
var/comment = ""
if(sides == 20 && result == 20)
comment = "Nat 20!"
else if(sides == 20 && result == 1)
comment = "Ouch, bad luck."
icon_state = "[name][result]"
user.visible_message("<span class='notice'>[user] has thrown [src]. It lands on [result]. [comment]</span>", \
"<span class='notice'>You throw [src]. It lands on a [result]. [comment]</span>", \
"<span class='notice'>You hear [src] landing on a [result]. [comment]</span>")
@@ -0,0 +1,132 @@
/obj/item/weapon/extinguisher
name = "fire extinguisher"
desc = "A traditional red fire extinguisher."
icon = 'icons/obj/items.dmi'
icon_state = "fire_extinguisher0"
item_state = "fire_extinguisher"
hitsound = 'sound/weapons/smash.ogg'
flags = FPRINT | USEDELAY | TABLEPASS | CONDUCT
throwforce = 10
w_class = 3.0
throw_speed = 2
throw_range = 10
force = 10.0
m_amt = 90
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
var/max_water = 50
var/last_use = 1.0
var/safety = 1
var/sprite_name = "fire_extinguisher"
/obj/item/weapon/extinguisher/mini
name = "fire extinguisher"
desc = "A light and compact fibreglass-framed model fire extinguisher."
icon_state = "miniFE0"
item_state = "miniFE"
hitsound = null //it is much lighter, after all.
flags = FPRINT | USEDELAY | TABLEPASS
throwforce = 2
w_class = 2.0
force = 3.0
m_amt = 0
max_water = 30
sprite_name = "miniFE"
/obj/item/weapon/extinguisher/New()
var/datum/reagents/R = new/datum/reagents(max_water)
reagents = R
R.my_atom = src
R.add_reagent("water", max_water)
/obj/item/weapon/extinguisher/examine()
set src in usr
usr << text("\icon[] [] contains [] units of water left!", src, src.name, src.reagents.total_volume)
..()
return
/obj/item/weapon/extinguisher/attack_self(mob/user as mob)
safety = !safety
src.icon_state = "[sprite_name][!safety]"
src.desc = "The safety is [safety ? "on" : "off"]."
user << "The safety is [safety ? "on" : "off"]."
return
/obj/item/weapon/extinguisher/afterattack(atom/target, mob/user , flag)
//TODO; Add support for reagents in water.
if( istype(target, /obj/structure/reagent_dispensers/watertank) && get_dist(src,target) <= 1)
var/obj/o = target
o.reagents.trans_to(src, 50)
user << "\blue \The [src] is now refilled"
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
return
if (!safety)
if (src.reagents.total_volume < 1)
usr << "\red \The [src] is empty."
return
if (world.time < src.last_use + 20)
return
src.last_use = world.time
playsound(src.loc, 'sound/effects/extinguish.ogg', 75, 1, -3)
var/direction = get_dir(src,target)
if(usr.buckled && isobj(usr.buckled) && !usr.buckled.anchored )
spawn(0)
var/obj/B = usr.buckled
var/movementdirection = turn(direction,180)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(1)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(1)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(1)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(2)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(2)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(3)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(3)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(3)
B.Move(get_step(usr,movementdirection), movementdirection)
var/turf/T = get_turf(target)
var/turf/T1 = get_step(T,turn(direction, 90))
var/turf/T2 = get_step(T,turn(direction, -90))
var/list/the_targets = list(T,T1,T2)
for(var/a=0, a<5, a++)
spawn(0)
var/obj/effect/effect/water/W = new /obj/effect/effect/water( get_turf(src) )
var/turf/my_target = pick(the_targets)
var/datum/reagents/R = new/datum/reagents(5)
if(!W) return
W.reagents = R
R.my_atom = W
if(!W || !src) return
src.reagents.trans_to(W,1)
for(var/b=0, b<5, b++)
step_towards(W,my_target)
if(!W) return
W.reagents.reaction(get_turf(W))
for(var/atom/atm in get_turf(W))
if(!W) return
W.reagents.reaction(atm)
if(W.loc == my_target) break
sleep(2)
if((istype(usr.loc, /turf/space)) || (usr.lastarea.has_gravity == 0))
user.inertia_dir = get_dir(target, user)
step(user, user.inertia_dir)
else
return ..()
return
+11 -12
View File
@@ -1,17 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/item/weapon/flamethrower/full/New(var/loc)
..()
weldtool = new/obj/item/weapon/weldingtool(src)
weldtool.status = 0
igniter = new/obj/item/device/assembly/igniter(src)
igniter.secured = 0
src.status = 1
update_icon()
return
/obj/item/weapon/flamethrower
name = "flamethrower"
icon = 'icons/obj/flamethrower.dmi'
@@ -245,3 +233,14 @@
target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500) // -- More of my "how do I shot fire?" dickery. -- TLE
//location.hotspot_expose(1000,500,1)
return
/obj/item/weapon/flamethrower/full/New(var/loc)
..()
weldtool = new/obj/item/weapon/weldingtool(src)
weldtool.status = 0
igniter = new/obj/item/device/assembly/igniter(src)
igniter.secured = 0
src.status = 1
update_icon()
return
@@ -1,86 +1,12 @@
/* Gifts and wrapping paper
* Contains:
* Gifts
* Wrapping Paper
*/
/*
CONTAINS:
WRAPPING PAPER
GIFTS
BEDSHEET BIN
PHOTOGRAPHS
*/
// WRAPPING PAPER
/obj/item/weapon/wrapping_paper/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (!( locate(/obj/structure/table, src.loc) ))
user << "\blue You MUST put the paper on a table!"
if (W.w_class < 4)
if ((istype(user.l_hand, /obj/item/weapon/wirecutters) || istype(user.r_hand, /obj/item/weapon/wirecutters)))
var/a_used = 2 ** (src.w_class - 1)
if (src.amount < a_used)
user << "\blue You need more paper!"
return
else
if(istype(W, /obj/item/smallDelivery) || istype(W, /obj/item/weapon/gift)) //No gift wrapping gifts!
return
src.amount -= a_used
user.drop_item()
var/obj/item/weapon/gift/G = new /obj/item/weapon/gift( src.loc )
G.size = W.w_class
G.w_class = G.size + 1
G.icon_state = text("gift[]", G.size)
G.gift = W
W.loc = G
G.add_fingerprint(user)
W.add_fingerprint(user)
src.add_fingerprint(user)
if (src.amount <= 0)
new /obj/item/weapon/c_tube( src.loc )
del(src)
return
else
user << "\blue You need scissors!"
else
user << "\blue The object is FAR too large!"
return
/obj/item/weapon/wrapping_paper/examine()
set src in oview(1)
..()
usr << text("There is about [] square units of paper left!", src.amount)
return
/obj/item/weapon/wrapping_paper/attack(mob/target as mob, mob/user as mob)
if (!istype(target, /mob/living/carbon/human)) return
var/mob/living/carbon/human/H = target
if (istype(H.wear_suit, /obj/item/clothing/suit/straight_jacket) || H.stat)
if (src.amount > 2)
var/obj/effect/spresent/present = new /obj/effect/spresent (H.loc)
src.amount -= 2
if (H.client)
H.client.perspective = EYE_PERSPECTIVE
H.client.eye = present
H.loc = present
H.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been wrapped with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to wrap [H.name] ([H.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) used the [src.name] to wrap [H.name] ([H.ckey])</font>")
else
user << "\blue You need more paper."
else
user << "Theyre moving around too much. a Straitjacket would help."
// GIFTS
* Gifts
*/
/obj/item/weapon/gift/attack_self(mob/user as mob)
user.drop_item()
if(src.gift)
@@ -154,50 +80,72 @@ PHOTOGRAPHS
else
return
// BEDSHEET BIN
/*
* Wrapping Paper
*/
/obj/item/weapon/wrapping_paper/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (!( locate(/obj/structure/table, src.loc) ))
user << "\blue You MUST put the paper on a table!"
if (W.w_class < 4)
if ((istype(user.l_hand, /obj/item/weapon/wirecutters) || istype(user.r_hand, /obj/item/weapon/wirecutters)))
var/a_used = 2 ** (src.w_class - 1)
if (src.amount < a_used)
user << "\blue You need more paper!"
return
else
if(istype(W, /obj/item/smallDelivery) || istype(W, /obj/item/weapon/gift)) //No gift wrapping gifts!
return
/obj/structure/bedsheetbin/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/bedsheet))
del(W)
src.amount++
src.amount -= a_used
user.drop_item()
var/obj/item/weapon/gift/G = new /obj/item/weapon/gift( src.loc )
G.size = W.w_class
G.w_class = G.size + 1
G.icon_state = text("gift[]", G.size)
G.gift = W
W.loc = G
G.add_fingerprint(user)
W.add_fingerprint(user)
src.add_fingerprint(user)
if (src.amount <= 0)
new /obj/item/weapon/c_tube( src.loc )
del(src)
return
else
user << "\blue You need scissors!"
else
user << "\blue The object is FAR too large!"
return
/obj/structure/bedsheetbin/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/structure/bedsheetbin/attack_hand(mob/user as mob)
if (src.amount >= 1)
src.amount--
new /obj/item/weapon/bedsheet( src.loc )
add_fingerprint(user)
/obj/structure/bedsheetbin/examine()
/obj/item/weapon/wrapping_paper/examine()
set src in oview(1)
src.amount = round(src.amount)
if (src.amount <= 0)
src.amount = 0
usr << "There are no bed sheets in the bin."
else
if (src.amount == 1)
usr << "There is one bed sheet in the bin."
else
usr << text("There are [] bed sheets in the bin.", src.amount)
return
// PHOTOGRAPH
/obj/item/weapon/paper/photograph/New()
..()
src.pixel_y = 0
src.pixel_x = 0
usr << text("There is about [] square units of paper left!", src.amount)
return
/obj/item/weapon/paper/photograph/attack_self(mob/user as mob)
/obj/item/weapon/wrapping_paper/attack(mob/target as mob, mob/user as mob)
if (!istype(target, /mob/living/carbon/human)) return
var/mob/living/carbon/human/H = target
var/n_name = copytext(sanitize(input(user, "What would you like to label the photo?", "Paper Labelling", null) as text),1,32)
if ((src.loc == user && user.stat == 0))
src.name = text("photo[]", (n_name ? text("- '[]'", n_name) : null))
src.add_fingerprint(user)
return
if (istype(H.wear_suit, /obj/item/clothing/suit/straight_jacket) || H.stat)
if (src.amount > 2)
var/obj/effect/spresent/present = new /obj/effect/spresent (H.loc)
src.amount -= 2
if (H.client)
H.client.perspective = EYE_PERSPECTIVE
H.client.eye = present
H.loc = present
H.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been wrapped with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to wrap [H.name] ([H.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) used the [src.name] to wrap [H.name] ([H.ckey])</font>")
else
user << "\blue You need more paper."
else
user << "Theyre moving around too much. a Straitjacket would help."
@@ -0,0 +1,284 @@
/obj/item/weapon/grenade/chem_grenade
name = "Grenade Casing"
icon_state = "chemg"
item_state = "flashbang"
w_class = 2.0
force = 2.0
var/stage = 0
var/state = 0
var/path = 0
var/motion = 0
var/direct = "SOUTH"
var/obj/item/weapon/circuitboard/circuit = null
var/list/beakers = new/list()
var/list/allowed_containers = list("/obj/item/weapon/reagent_containers/glass/beaker", "/obj/item/weapon/reagent_containers/glass/dispenser", "/obj/item/weapon/reagent_containers/glass/bottle")
var/affected_area = 3
New()
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
R.my_atom = src
attack_self(mob/user as mob)
if(stage > 1)
..()
attackby(obj/item/weapon/W as obj, mob/user as mob)//TODO:Have grenades use the new assembly things
if(istype(W,/obj/item/device/assembly_holder) && !stage && path != 2)
path = 1
user << "\blue You add [W] to the metal casing."
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 25, -3)
del(W) //Okay so we're not really adding anything here. cheating.
icon_state = initial(icon_state) +"_ass"
name = "unsecured grenade"
stage = 1
else if(istype(W,/obj/item/weapon/screwdriver) && stage == 1 && path != 2)
path = 1
if(beakers.len)
user << "\blue You lock the assembly."
playsound(src.loc, 'sound/items/Screwdriver.ogg', 25, -3)
name = "grenade"
icon_state = initial(icon_state) +"_locked"
stage = 2
else
user << "\red You need to add at least one beaker before locking the assembly."
else if((istype(W,/obj/item/weapon/reagent_containers/glass/beaker) || istype(W,/obj/item/weapon/reagent_containers/glass/bottle)) && stage == 1 && path != 2)
path = 1
if(beakers.len == 2)
user << "\red The grenade can not hold more containers."
return
else
if(W.reagents.total_volume)
user << "\blue You add \the [W] to the assembly."
user.drop_item()
W.loc = src
beakers += W
else
user << "\red \the [W] is empty."
else if(path != 1)
if(!istype(src.loc,/turf))
user << "\red You need to put the canister on the ground to do that!"
else
switch(state)
if(0)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 20))
user << "\blue You wrench the canister in place."
src.name = "Camera Assembly"
src.anchored = 1
src.state = 1
path = 2
if(1)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 20))
user << "\blue You unfasten the canister."
src.name = "Grenade Casing"
src.anchored = 0
src.state = 0
path = 0
if(istype(W, /obj/item/device/multitool))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "\blue You place the electronics inside the canister."
src.circuit = W
user.drop_item()
W.loc = src
if(istype(W, /obj/item/weapon/screwdriver) && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "\blue You screw the circuitry into place."
src.state = 2
if(istype(W, /obj/item/weapon/crowbar) && circuit)
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
user << "\blue You remove the circuitry."
src.state = 1
circuit.loc = src.loc
src.circuit = null
if(2)
if(istype(W, /obj/item/weapon/screwdriver) && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "\blue You unfasten the circuitry."
src.state = 1
if(istype(W, /obj/item/weapon/cable_coil))
if(W:amount >= 1)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
W:amount -= 1
if(!W:amount) del(W)
user << "\blue You add cabling to the canister."
src.state = 3
if(3)
if(istype(W, /obj/item/weapon/wirecutters))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
user << "\blue You remove the cabling."
src.state = 2
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( src.loc )
A.amount = 1
if(issignaler(W))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "\blue You attach the wireless signaller unit to the circutry."
user.drop_item()
W.loc = src
src.state = 4
if(4)
if(istype(W, /obj/item/weapon/crowbar) && !motion)
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
user << "\blue You remove the remote signalling device."
src.state = 3
new /obj/item/device/assembly/signaler( src.loc, 1 )
if(isprox(W) && motion == 0)
// if(W:amount >= 1)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
// W:use(1)
user << "\blue You attach the proximity sensor."
user.drop_item()
W.loc = src
motion = 1
if(istype(W, /obj/item/weapon/crowbar) && motion)
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
user << "\blue You remove the proximity sensor."
new /obj/item/device/assembly/prox_sensor( src.loc, 1 )
motion = 0
if(istype(W, /obj/item/stack/sheet/glass))
if(W:amount >= 1)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
W:use(1)
user << "\blue You put in the glass lens."
src.state = 5
if(5)
if(istype(W, /obj/item/weapon/crowbar))
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
user << "\blue You remove the glass lens."
src.state = 4
new /obj/item/stack/sheet/glass( src.loc, 2 )
if(istype(W, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "\blue You connect the lense."
var/obj/machinery/camera/B = null
if(motion == 1)
B = new /obj/machinery/camera/motion( src.loc )
else
B = new /obj/machinery/camera( src.loc )
// To prevent people exploiting the fact that it doesn't delete the assembly until the user is done
// entering the camera options.
src.loc = B
//Auto detect walls and turn camera based on wall locations.
B.auto_turn()
B.network = "SS13"
B.network = input(usr, "Which network would you like to connect this camera to?", "Set Network", "SS13")
for(var/i = 5; i >= 0; i -= 1)
direct = input(user, "Direction?", "Assembling Camera", null) in list("LEAVE IT", "NORTH", "EAST", "SOUTH", "WEST" )
if(direct != "LEAVE IT")
B.dir = text2dir(direct)
if(i != 0)
var/confirm = alert(user, "Is this what you want? Chances Remaining: [i]", "Confirmation", "Yes", "No")
if(confirm == "Yes")
break
del(src)
prime()
if(prob(reliability))
var/has_reagents = 0
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
if(G.reagents.total_volume) has_reagents = 1
if(!has_reagents)
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 50, 1)
state = 0
return
playsound(src.loc, 'sound/effects/bamf.ogg', 50, 1)
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.reagents.trans_to(src, G.reagents.total_volume)
if(src.reagents.total_volume) //The possible reactions didnt use up all reagents.
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
steam.set_up(10, 0, get_turf(src))
steam.attach(src)
steam.start()
for(var/atom/A in view(affected_area, src.loc))
if( A == src ) continue
src.reagents.reaction(A, 1, 10)
invisibility = INVISIBILITY_MAXIMUM //Why am i doing this?
spawn(50) //To make sure all reagents can work
del(src) //correctly before deleting the grenade.
else
icon_state = initial(icon_state) + "_locked"
crit_fail = 1
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.loc = get_turf(src.loc)
/obj/item/weapon/grenade/chem_grenade/large
name = "Large Chem Grenade"
desc = "An oversized grenade that affects a larger area."
icon_state = "large_grenade"
allowed_containers = list("/obj/item/weapon/reagent_containers/glass")
origin_tech = "combat=3;materials=3"
affected_area = 4
/obj/item/weapon/grenade/chem_grenade/metalfoam
name = "Metal-Foam Grenade"
desc = "Used for emergency sealing of air breaches."
path = 1
stage = 2
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("aluminum", 30)
B2.reagents.add_reagent("foaming_agent", 10)
B2.reagents.add_reagent("pacid", 10)
beakers += B1
beakers += B2
icon_state = "grenade"
/obj/item/weapon/grenade/chem_grenade/incendiary
name = "Incendiary Grenade"
desc = "Used for clearing rooms of living things."
path = 1
stage = 2
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("aluminum", 25)
B2.reagents.add_reagent("plasma", 25)
B2.reagents.add_reagent("sacid", 25)
beakers += B1
beakers += B2
icon_state = "grenade"
/obj/item/weapon/grenade/chem_grenade/cleaner
name = "Cleaner Grenade"
desc = "BLAM!-brand foaming space cleaner. In a special applicator for rapid cleaning of wide areas."
stage = 2
path = 1
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("fluorosurfactant", 40)
B2.reagents.add_reagent("water", 40)
B2.reagents.add_reagent("cleaner", 10)
beakers += B1
beakers += B2
icon_state = "grenade"
@@ -0,0 +1,11 @@
/obj/item/weapon/grenade/empgrenade
name = "emp grenade"
icon_state = "emp"
item_state = "emp"
origin_tech = "materials=2;magnets=3"
prime()
..()
if(empulse(src, 5, 7))
del(src)
return
@@ -0,0 +1,172 @@
/obj/item/weapon/grenade/flashbang
name = "flashbang"
icon_state = "flashbang"
item_state = "flashbang"
origin_tech = "materials=2;combat=1"
var/banglet = 0
prime()
..()
for(var/obj/structure/closet/L in view(get_turf(src), null))
if(locate(/mob/living/carbon/, L))
for(var/mob/living/carbon/M in L)
bang(get_turf(src), M)
for(var/mob/living/carbon/M in viewers(get_turf(src), null))
bang(get_turf(src), M)
for(var/obj/effect/blob/B in view(8,get_turf(src))) //Blob damage here
var/damage = round(30/(get_dist(B,get_turf(src))+1))
B.health -= damage
B.update_icon()
del(src)
return
proc/bang(var/turf/T , var/mob/living/carbon/M) // Added a new proc called 'bang' that takes a location and a person to be banged.
if (locate(/obj/item/weapon/cloaking_device, M)) // Called during the loop that bangs people in lockers/containers and when banging
for(var/obj/item/weapon/cloaking_device/S in M) // people in normal view. Could theroetically be called during other explosions.
S.active = 0 // -- Polymorph
S.icon_state = "shield0"
M << "\red <B>BANG</B>"
playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
//Checking for protections
var/eye_safety = 0
var/ear_safety = 0
if(iscarbon(M))
eye_safety = M.eyecheck()
if(ishuman(M))
if(istype(M:ears, /obj/item/clothing/ears/earmuffs))
ear_safety += 2
if(HULK in M.mutations)
ear_safety += 1
if(istype(M:head, /obj/item/clothing/head/helmet))
ear_safety += 1
//Flashing everyone
if(eye_safety < 1)
flick("e_flash", M.flash)
M.eye_stat += rand(1, 3)
M.Stun(2)
M.Weaken(10)
//Now applying sound
if((get_dist(M, T) <= 2 || src.loc == M.loc || src.loc == M))
if(ear_safety > 0)
M.Stun(2)
M.Weaken(1)
else
M.Stun(10)
M.Weaken(3)
if ((prob(14) || (M == src.loc && prob(70))))
M.ear_damage += rand(1, 10)
else
M.ear_damage += rand(0, 5)
M.ear_deaf = max(M.ear_deaf,15)
else if(get_dist(M, T) <= 5)
if(!ear_safety)
M.Stun(8)
M.ear_damage += rand(0, 3)
M.ear_deaf = max(M.ear_deaf,10)
else if(!ear_safety)
M.Stun(4)
M.ear_damage += rand(0, 1)
M.ear_deaf = max(M.ear_deaf,5)
//This really should be in mob not every check
if (M.eye_stat >= 20)
M << "\red Your eyes start to burn badly!"
M.disabilities |= NEARSIGHTED
if(!banglet && !(istype(src , /obj/item/weapon/grenade/flashbang/clusterbang)))
if (prob(M.eye_stat - 20 + 1))
M << "\red You can't see anything!"
M.sdisabilities |= BLIND
if (M.ear_damage >= 15)
M << "\red Your ears start to ring badly!"
if(!banglet && !(istype(src , /obj/item/weapon/grenade/flashbang/clusterbang)))
if (prob(M.ear_damage - 10 + 5))
M << "\red You can't hear anything!"
M.sdisabilities |= DEAF
else
if (M.ear_damage >= 5)
M << "\red Your ears start to ring!"
M.update_icons()
/obj/item/weapon/grenade/flashbang/clusterbang//Created by Polymorph, fixed by Sieve
desc = "Use of this weapon may constiute a war crime in your area, consult your local captain."
name = "clusterbang"
icon = 'icons/obj/grenade.dmi'
icon_state = "clusterbang"
/obj/item/weapon/grenade/flashbang/clusterbang/prime()
var/numspawned = rand(4,8)
var/again = 0
for(var/more = numspawned,more > 0,more--)
if(prob(35))
again++
numspawned --
for(,numspawned > 0, numspawned--)
spawn(0)
new /obj/item/weapon/grenade/flashbang/cluster(src.loc)//Launches flashbangs
playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
for(,again > 0, again--)
spawn(0)
new /obj/item/weapon/grenade/flashbang/clusterbang/segment(src.loc)//Creates a 'segment' that launches a few more flashbangs
playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
spawn(0)
del(src)
return
/obj/item/weapon/grenade/flashbang/clusterbang/segment
desc = "A smaller segment of a clusterbang. Better run."
name = "clusterbang segment"
icon = 'icons/obj/grenade.dmi'
icon_state = "clusterbang_segment"
/obj/item/weapon/grenade/flashbang/clusterbang/segment/New()//Segments should never exist except part of the clusterbang, since these immediately 'do their thing' and asplode
icon_state = "clusterbang_segment_active"
active = 1
banglet = 1
var/stepdist = rand(1,4)//How far to step
var/temploc = src.loc//Saves the current location to know where to step away from
walk_away(src,temploc,stepdist)//I must go, my people need me
var/dettime = rand(15,60)
spawn(dettime)
prime()
..()
/obj/item/weapon/grenade/flashbang/clusterbang/segment/prime()
var/numspawned = rand(4,8)
for(var/more = numspawned,more > 0,more--)
if(prob(35))
numspawned --
for(,numspawned > 0, numspawned--)
spawn(0)
new /obj/item/weapon/grenade/flashbang/cluster(src.loc)
playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
spawn(0)
del(src)
return
/obj/item/weapon/grenade/flashbang/cluster/New()//Same concept as the segments, so that all of the parts don't become reliant on the clusterbang
spawn(0)
icon_state = "flashbang_active"
active = 1
banglet = 1
var/stepdist = rand(1,3)
var/temploc = src.loc
walk_away(src,temploc,stepdist)
var/dettime = rand(15,60)
spawn(dettime)
prime()
..()
@@ -0,0 +1,106 @@
/obj/item/weapon/grenade
name = "grenade"
desc = "A hand held grenade, with an adjustable timer."
w_class = 2.0
icon = 'icons/obj/grenade.dmi'
icon_state = "grenade"
item_state = "flashbang"
throw_speed = 4
throw_range = 20
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
var/active = 0
var/det_time = 50
/obj/item/weapon/grenade/proc/clown_check(var/mob/living/user)
if((CLUMSY in user.mutations) && prob(50))
user << "<span class='warning'>Huh? How does this thing work?</span>"
active = 1
icon_state = initial(icon_state) + "_active"
playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
spawn(5)
if(user)
user.drop_item()
prime()
return 0
return 1
/*/obj/item/weapon/grenade/afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
if (istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
if((user.get_active_hand() == src) && (!active) && (clown_check(user)) && target.loc != src.loc)
user << "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>"
active = 1
icon_state = initial(icon_state) + "_active"
playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
spawn(det_time)
prime()
return
user.dir = get_dir(user, target)
user.drop_item()
var/t = (isturf(target) ? target : target.loc)
walk_towards(src, t, 3)
return*/
/obj/item/weapon/grenade/examine()
set src in usr
usr << desc
if(det_time > 1)
usr << "The timer is set to [det_time/10] seconds."
return
usr << "\The [src] is set for instant detonation."
/obj/item/weapon/grenade/attack_self(mob/user as mob)
if(!active)
if(clown_check(user))
user << "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>"
active = 1
icon_state = initial(icon_state) + "_active"
add_fingerprint(user)
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
spawn(det_time)
if(user)
user.drop_item()
prime()
return
return
/obj/item/weapon/grenade/proc/prime()
// playsound(loc, 'sound/items/Welder2.ogg', 25, 1)
var/turf/T = get_turf(src)
if(T)
T.hotspot_expose(700,125)
/obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(isscrewdriver(W))
switch(det_time)
if ("1")
det_time = 10
user << "<span class='notice'>You set the [name] for 1 second detonation time.</span>"
if ("10")
det_time = 30
user << "<span class='notice'>You set the [name] for 3 second detonation time.</span>"
if ("30")
det_time = 50
user << "<span class='notice'>You set the [name] for 5 second detonation time.</span>"
if ("50")
det_time = 1
user << "<span class='notice'>You set the [name] for instant detonation.</span>"
add_fingerprint(user)
..()
return
/obj/item/weapon/grenade/attack_hand()
walk(src, null, null)
..()
return
/obj/item/weapon/grenade/attack_paw(mob/user as mob)
return attack_hand(user)
@@ -0,0 +1,35 @@
/obj/item/weapon/grenade/smokebomb
desc = "It is set to detonate in 2 seconds."
name = "smoke bomb"
icon = 'icons/obj/grenade.dmi'
icon_state = "flashbang"
det_time = 20
item_state = "flashbang"
flags = FPRINT | TABLEPASS | USEDELAY
slot_flags = SLOT_BELT
var/datum/effect/effect/system/bad_smoke_spread/smoke
New()
..()
src.smoke = new /datum/effect/effect/system/bad_smoke_spread
src.smoke.attach(src)
src.smoke.set_up(10, 0, usr.loc)
prime()
playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
spawn(0)
src.smoke.start()
sleep(10)
src.smoke.start()
sleep(10)
src.smoke.start()
sleep(10)
src.smoke.start()
for(var/obj/effect/blob/B in view(8,src))
var/damage = round(30/(get_dist(B,src)+1))
B.health -= damage
B.update_icon()
sleep(80)
del(src)
return
@@ -0,0 +1,52 @@
/obj/item/weapon/grenade/spawnergrenade
desc = "It is set to detonate in 5 seconds. It will unleash unleash an unspecified anomaly into the vicinity."
name = "delivery grenade"
icon = 'icons/obj/grenade.dmi'
icon_state = "delivery"
item_state = "flashbang"
origin_tech = "materials=3;magnets=4"
var/banglet = 0
var/spawner_type = null // must be an object path
var/deliveryamt = 1 // amount of type to deliver
prime() // Prime now just handles the two loops that query for people in lockers and people who can see it.
if(spawner_type && deliveryamt)
// Make a quick flash
var/turf/T = get_turf(src)
playsound(T, 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/human/M in viewers(T, null))
if(M:eyecheck() <= 0)
flick("e_flash", M.flash) // flash dose faggots
for(var/i=1, i<=deliveryamt, i++)
var/atom/movable/x = new spawner_type
x.loc = T
if(prob(50))
for(var/j = 1, j <= rand(1, 3), j++)
step(x, pick(NORTH,SOUTH,EAST,WEST))
// Spawn some hostile syndicate critters
if(istype(x, /obj/effect/critter))
var/obj/effect/critter/C = x
C.atkcarbon = 1
C.atksilicon = 1
C.atkmech = 0
C.atksynd = 0
C.aggressive = 1
del(src)
return
/obj/item/weapon/grenade/spawnergrenade/manhacks
name = "manhack delivery grenade"
spawner_type = /obj/effect/critter/manhack
deliveryamt = 5
origin_tech = "materials=3;magnets=4;syndicate=4"
/obj/item/weapon/grenade/spawnergrenade/spesscarp
name = "carp delivery grenade"
spawner_type = /mob/living/simple_animal/carp
deliveryamt = 5
origin_tech = "materials=3;magnets=4;syndicate=4"
@@ -0,0 +1,76 @@
/obj/item/weapon/handcuffs/attack(mob/M as mob, mob/user as mob)
if(istype(src, /obj/item/weapon/handcuffs/cyborg) && isrobot(user))
if(!M.handcuffed)
var/turf/p_loc = user.loc
var/turf/p_loc_m = M.loc
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
for(var/mob/O in viewers(user, null))
O.show_message("\red <B>[user] is trying to put handcuffs on [M]!</B>", 1)
spawn(30)
if(!M) return
if(p_loc == user.loc && p_loc_m == M.loc)
M.handcuffed = new /obj/item/weapon/handcuffs(M)
M.update_inv_handcuffed()
else
if ((CLUMSY in usr.mutations) && prob(50))
usr << "\red Uh ... how do those things work?!"
if (istype(M, /mob/living/carbon/human))
if(!M.handcuffed)
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = user
O.target = user
O.item = user.get_active_hand()
O.s_loc = user.loc
O.t_loc = user.loc
O.place = "handcuff"
M.requests += O
spawn( 0 )
O.process()
return
return
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
usr << "\red You don't have the dexterity to do this!"
return
if (istype(M, /mob/living/carbon/human))
if(!M.handcuffed)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been handcuffed (attempt) by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to handcuff [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) Attempted to handcuff [M.name] ([M.ckey])</font>")
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = user
O.target = M
O.item = user.get_active_hand()
O.s_loc = user.loc
O.t_loc = M.loc
O.place = "handcuff"
M.requests += O
spawn( 0 )
if(istype(src, /obj/item/weapon/handcuffs/cable))
feedback_add_details("handcuffs","C")
playsound(src.loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
else
feedback_add_details("handcuffs","H")
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
O.process()
return
else
if(!M.handcuffed)
var/obj/effect/equip_e/monkey/O = new /obj/effect/equip_e/monkey( )
O.source = user
O.target = M
O.item = user.get_active_hand()
O.s_loc = user.loc
O.t_loc = M.loc
O.place = "handcuff"
M.requests += O
spawn( 0 )
if(istype(src, /obj/item/weapon/handcuffs/cable))
playsound(src.loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
else
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
O.process()
return
return
+48 -10
View File
@@ -1,22 +1,56 @@
/* Hydroponic stuff
* Contains:
* Plant Bags
* Sunflowers
* Nettle
* Deathnettle
* Corbcob
*/
/*
* Plant Bags
*/
/obj/item/weapon/plantbag
icon = 'icons/obj/hydroponics.dmi'
icon_state = "plantbag"
name = "Plant Bag"
var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
var/capacity = 50; //the number of plant pieces it can carry.
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 1
CONTAINS:
Plant-B-Gone
Nettle
Deathnettle
Craftables (Cob pipes, potato batteries, pumpkinheads)
/obj/item/weapon/plantbag/attack_self(mob/user as mob)
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/O in contents)
contents -= O
O.loc = user.loc
user << "\blue You empty the plant bag."
return
*/
/obj/item/weapon/plantbag/verb/toggle_mode()
set name = "Switch Bagging Method"
set category = "Object"
mode = !mode
switch (mode)
if(1)
usr << "The bag now picks up all plants in a tile at once."
if(0)
usr << "The bag now picks up one plant at a time."
/*
* Sunflower
*/
// Sunflower
/obj/item/weapon/grown/sunflower/attack(mob/M as mob, mob/user as mob)
M << "<font color='green'><b> [user] smacks you with a sunflower!</font><font color='yellow'><b>FLOWER POWER<b></font>"
user << "<font color='green'> Your sunflower's </font><font color='yellow'><b>FLOWER POWER</b></font><font color='green'> strikes [M]</font>"
// Nettle
/*
* Nettle
*/
/obj/item/weapon/grown/nettle/pickup(mob/living/carbon/human/user as mob)
if(!user.gloves)
user << "\red The nettle burns your bare hand!"
@@ -39,8 +73,10 @@ Craftables (Cob pipes, potato batteries, pumpkinheads)
potency = newValue
force = round((5+potency/5), 1)
/*
* Deathnettle
*/
// Deathnettle
/obj/item/weapon/grown/deathnettle/pickup(mob/living/carbon/human/user as mob)
if(!user.gloves)
if(istype(user, /mob/living/carbon/human))
@@ -82,7 +118,9 @@ Craftables (Cob pipes, potato batteries, pumpkinheads)
force = round((5+potency/2.5), 1)
//Crafting
/*
* Corncob
*/
/obj/item/weapon/corncob/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/kitchen/utensil/knife))
+25 -27
View File
@@ -1,10 +1,10 @@
/*
CONTAINS:
FORK
ROLLING PIN
KNIFE
*/
/* Kitchen tools
* Contains:
* Forks
* Knives
* Rolling Pins
* Trays
*/
/obj/item/weapon/kitchen/utensil/New()
@@ -15,8 +15,9 @@ KNIFE
// FORK
/*
* Forks
*/
/obj/item/weapon/kitchen/utensil/fork/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
@@ -41,10 +42,19 @@ KNIFE
M = user
return eyestab(M,user)
/*
* Knives
*/
/obj/item/weapon/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red You accidentally cut yourself with the [src]."
user.take_organ_damage(20)
return
return ..()
// ROLLING PIN
/*
* Rolling Pins
*/
/obj/item/weapon/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
@@ -80,21 +90,9 @@ KNIFE
return
// KNIFE
/obj/item/weapon/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red You accidentally cut yourself with the [src]."
user.take_organ_damage(20)
return
return ..()
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////// TRAY -Agouri :3 ///////////////////////////////////////////////
/*
* Trays - Agouri
*/
/obj/item/weapon/tray/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
// Drop all the things. All of them.
@@ -1,64 +0,0 @@
/*
CONTAINS:
MEDICAL
*/
/obj/item/stack/medical/attack(mob/living/carbon/M as mob, mob/user as mob)
if (M.stat == 2)
var/t_him = "it"
if (M.gender == MALE)
t_him = "him"
else if (M.gender == FEMALE)
t_him = "her"
user << "\red \The [M] is dead, you cannot help [t_him]!"
return
if (!istype(M))
user << "\red \The [src] cannot be applied to [M]!"
return 1
if ( ! (istype(user, /mob/living/carbon/human) || \
istype(user, /mob/living/silicon) || \
istype(user, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
user << "\red You don't have the dexterity to do this!"
return 1
if (user)
if (M != user)
user.visible_message( \
"\blue [M] has been applied with [src] by [user].", \
"\blue You apply \the [src] to [M]." \
)
else
var/t_himself = "itself"
if (user.gender == MALE)
t_himself = "himself"
else if (user.gender == FEMALE)
t_himself = "herself"
user.visible_message( \
"\blue [M] applied [src] on [t_himself].", \
"\blue You apply \the [src] on yourself." \
)
if (istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/datum/organ/external/affecting = H.get_organ("chest")
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/user2 = user
affecting = H.get_organ(check_zone(user2.zone_sel.selecting))
else
if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0)
affecting = H.get_organ("head")
if (affecting.heal_damage(src.heal_brute, src.heal_burn))
H.UpdateDamageIcon()
M.updatehealth()
else
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
use(1)
@@ -1,37 +1,13 @@
/obj/item/weapon/storage/photo_album
name = "Photo album"
icon = 'icons/obj/items.dmi'
icon_state = "album"
item_state = "briefcase"
can_hold = list("/obj/item/weapon/photo",)
/obj/item/weapon/storage/photo_album/MouseDrop(obj/over_object as obj)
if ((istype(usr, /mob/living/carbon/human) || (ticker && ticker.mode.name == "monkey")))
var/mob/M = usr
if (!( istype(over_object, /obj/screen) ))
return ..()
playsound(src.loc, "rustle", 50, 1, -5)
if ((!( M.restrained() ) && !( M.stat ) && M.back == src))
switch(over_object.name)
if("r_hand")
M.u_equip(src)
M.put_in_r_hand(src)
if("l_hand")
M.u_equip(src)
M.put_in_l_hand(src)
src.add_fingerprint(usr)
return
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
if (usr.s_active)
usr.s_active.close(usr)
src.show_to(usr)
return
return
/obj/item/weapon/storage/photo_album/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
/* Photography!
* Contains:
* Camera
* Photos
* Photo Albums
*/
/*
* Camera
*/
/obj/item/weapon/camera_test
name = "camera"
icon = 'icons/obj/items.dmi'
@@ -160,3 +136,59 @@
can_use = 0
spawn(50) can_use = 1
/*
* Photos
*/
/obj/item/weapon/paper/photograph/New()
..()
src.pixel_y = 0
src.pixel_x = 0
return
/obj/item/weapon/paper/photograph/attack_self(mob/user as mob)
var/n_name = copytext(sanitize(input(user, "What would you like to label the photo?", "Paper Labelling", null) as text),1,32)
if ((src.loc == user && user.stat == 0))
src.name = text("photo[]", (n_name ? text("- '[]'", n_name) : null))
src.add_fingerprint(user)
return
/*
* Photo Albums
*/
/obj/item/weapon/storage/photo_album
name = "Photo album"
icon = 'icons/obj/items.dmi'
icon_state = "album"
item_state = "briefcase"
can_hold = list("/obj/item/weapon/photo",)
/obj/item/weapon/storage/photo_album/MouseDrop(obj/over_object as obj)
if ((istype(usr, /mob/living/carbon/human) || (ticker && ticker.mode.name == "monkey")))
var/mob/M = usr
if (!( istype(over_object, /obj/screen) ))
return ..()
playsound(src.loc, "rustle", 50, 1, -5)
if ((!( M.restrained() ) && !( M.stat ) && M.back == src))
switch(over_object.name)
if("r_hand")
M.u_equip(src)
M.put_in_r_hand(src)
if("l_hand")
M.u_equip(src)
M.put_in_l_hand(src)
src.add_fingerprint(usr)
return
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
if (usr.s_active)
usr.s_active.close(usr)
src.show_to(usr)
return
return
/obj/item/weapon/storage/photo_album/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
@@ -1,176 +0,0 @@
/**********************Plant Bag**************************/
/obj/item/weapon/plantbag
icon = 'icons/obj/hydroponics.dmi'
icon_state = "plantbag"
name = "Plant Bag"
var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
var/capacity = 50; //the number of plant pieces it can carry.
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 1
/obj/item/weapon/plantbag/attack_self(mob/user as mob)
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/O in contents)
contents -= O
O.loc = user.loc
user << "\blue You empty the plant bag."
return
/obj/item/weapon/plantbag/verb/toggle_mode()
set name = "Switch Bagging Method"
set category = "Object"
mode = !mode
switch (mode)
if(1)
usr << "The bag now picks up all plants in a tile at once."
if(0)
usr << "The bag now picks up one plant at a time."
/obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
..()
if (istype(O, /obj/item/weapon/plantbag))
src.attack_hand(user)
var/obj/item/weapon/plantbag/S = O
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in locate(user.x,user.y,user.z))
if (S.contents.len < S.capacity)
S.contents += G;
else
user << "\blue The plant bag is full."
return
/* SmartFridge. Much todo
*/
/obj/machinery/smartfridge
name = "\improper SmartFridge"
icon = 'icons/obj/vending.dmi'
icon_state = "smartfridge"
layer = 2.9
density = 1
anchored = 1
use_power = 1
idle_power_usage = 5
active_power_usage = 100
flags = NOREACT
var/global/max_n_of_items = 200
var/item_quants = list()
var/ispowered = 1 //starts powered
var/isbroken = 0
/obj/machinery/smartfridge/power_change()
if( powered() )
src.ispowered = 1
stat &= ~NOPOWER
if(!isbroken)
icon_state = "smartfridge"
else
spawn(rand(0, 15))
src.ispowered = 0
stat |= NOPOWER
if(!isbroken)
icon_state = "smartfridge-off"
/*******************
* Item Adding
********************/
/obj/machinery/smartfridge/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(!src.ispowered)
user << "<span class='notice'>\The [src] is unpowered and useless.</span>"
return
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/grown/))
if(contents.len >= max_n_of_items)
user << "<span class='notice'>\The [src] is full.</span>"
return 1
else
user.before_take_item(O)
O.loc = src
if(item_quants[O.name])
item_quants[O.name]++
else
item_quants[O.name] = 1
user.visible_message("<span class='notice'>[user] has added \the [O] to \the [src].", \
"<span class='notice'>You add \the [O] to \the [src].")
else if(istype(O, /obj/item/weapon/plantbag))
user.visible_message("<span class='notice'>[user] loads \the [src] with \the [O].</span>", \
"<span class='notice'>You load \the [src] with \the [O].</span>")
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
if(contents.len >= max_n_of_items)
user << "<span class='notice'>\The [src] is full.</span>"
return 1
else
O.contents -= G
G.loc = src
if(item_quants[G.name])
item_quants[G.name]++
else
item_quants[G.name] = 1
else
user << "<span class='notice'>\The [src] smartly refuses [O].</span>"
return 1
updateUsrDialog()
/obj/machinery/smartfridge/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/smartfridge/attack_ai(mob/user as mob)
return 0
/obj/machinery/smartfridge/attack_hand(mob/user as mob)
user.machine = src
interact(user)
/*******************
* SmartFridge Menu
********************/
/obj/machinery/smartfridge/proc/interact(mob/user as mob)
if(!src.ispowered)
return
var/dat = "<TT><b>Select an item:</b><br>"
if (contents.len == 0)
dat += "<font color = 'red'>No product loaded!</font>"
else
for (var/O in item_quants)
if(item_quants[O] > 0)
var/N = item_quants[O]
dat += "<FONT color = 'blue'><B>[capitalize(O)]</B>:"
dat += " [N] </font>"
dat += "<a href='byond://?src=\ref[src];vend=[O]'>Vend</A>"
dat += "<br>"
dat += "</TT>"
user << browse("<HEAD><TITLE>SmartFridge Supplies</TITLE></HEAD><TT>[dat]</TT>", "window=smartfridge")
onclose(user, "smartfridge")
return
/obj/machinery/smartfridge/Topic(href, href_list)
if(..())
return
usr.machine = src
var/N = href_list["vend"]
if(item_quants[N] <= 0) // Sanity check, there are probably ways to press the button when it shouldn't be possible.
return
item_quants[N] -= 1
for(var/obj/O in contents)
if(O.name == N)
O.loc = src.loc
break
src.updateUsrDialog()
return
@@ -0,0 +1,32 @@
/obj/item/weapon/teleportation_scroll/attack_self(mob/user as mob)
user.machine = src
var/dat = "<B>Teleportation Scroll:</B><BR>"
dat += "Number of uses: [src.uses]<BR>"
dat += "<HR>"
dat += "<B>Four uses use them wisely:</B><BR>"
dat += "<A href='byond://?src=\ref[src];spell_teleport=1'>Teleport</A><BR>"
dat += "Kind regards,<br>Wizards Federation<br><br>P.S. Don't forget to bring your gear, you'll need it to cast most spells.<HR>"
user << browse(dat, "window=scroll")
onclose(user, "scroll")
return
/obj/item/weapon/teleportation_scroll/Topic(href, href_list)
..()
if (usr.stat || usr.restrained())
return
var/mob/living/carbon/human/H = usr
if (!( istype(H, /mob/living/carbon/human)))
return 1
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
usr.machine = src
if (href_list["spell_teleport"])
if (src.uses >= 1)
src.uses -= 1
usr.teleportscroll()
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)
return
@@ -0,0 +1,53 @@
/obj/item/weapon/secstorage/sbriefcase
name = "secure briefcase"
icon = 'icons/obj/storage.dmi'
icon_state = "secure"
item_state = "sec-case"
desc = "A large briefcase with a digital locking system."
flags = FPRINT | TABLEPASS
force = 8.0
throw_speed = 1
throw_range = 4
w_class = 4.0
/obj/item/weapon/secstorage/sbriefcase/New()
..()
new /obj/item/weapon/paper(src)
new /obj/item/weapon/pen(src)
/obj/item/weapon/secstorage/sbriefcase/attack(mob/M as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red The [src] slips out of your hand and hits your head."
user.take_organ_damage(10)
user.Paralyse(2)
return
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
var/t = user:zone_sel.selecting
if (t == "head")
if(ishuman(M))
var/mob/living/carbon/human/H = M
if (H.stat < 2 && H.health < 50 && prob(90))
// ******* Check
if (istype(H, /obj/item/clothing/head) && H.flags & 8 && prob(80))
H << "\red The helmet protects you from being hit hard in the head!"
return
var/time = rand(2, 6)
if (prob(75))
H.Paralyse(time)
else
H.Stun(time)
if(H.stat != 2) H.stat = 1
for(var/mob/O in viewers(H, null))
O.show_message(text("\red <B>[] has been knocked unconscious!</B>", H), 1, "\red You hear someone fall.", 2)
else
H << text("\red [] tried to knock you unconcious!",user)
H.eye_blurry += 3
return
@@ -0,0 +1,273 @@
/obj/item/weapon/secstorage
name = "secstorage"
var/obj/screen/storage/boxes = null
var/obj/screen/close/closer = null
var/icon_locking = "secureb"
var/icon_sparking = "securespark"
var/icon_opened = "secure0"
var/locked = 1
var/code = ""
var/l_code = null
var/l_set = 0
var/l_setshort = 0
var/l_hacking = 0
var/emagged = 0
var/open = 0
var/internalstorage = 3
w_class = 3.0
/obj/item/weapon/secstorage/examine()
set src in oview(1)
..()
usr << text("The service panel is [src.open ? "open" : "closed"].")
return
/obj/item/weapon/secstorage/proc/return_inv()
var/list/L = list( )
L += src.contents
for(var/obj/item/weapon/secstorage/S in src)
L += S.return_inv()
for(var/obj/item/weapon/gift/G in src)
L += G.gift
if (istype(G.gift, /obj/item/weapon/secstorage))
L += G.gift:return_inv()
return L
/obj/item/weapon/secstorage/proc/show_to(mob/user as mob)
user.client.screen -= src.boxes
user.client.screen -= src.closer
user.client.screen -= src.contents
user.client.screen += src.boxes
user.client.screen += src.closer
user.client.screen += src.contents
user.s_active = src
return
/obj/item/weapon/secstorage/proc/hide_from(mob/user as mob)
if(!user.client)
return
user.client.screen -= src.boxes
user.client.screen -= src.closer
user.client.screen -= src.contents
return
/obj/item/weapon/secstorage/proc/close(mob/user as mob)
src.hide_from(user)
user.s_active = null
return
/obj/item/weapon/secstorage/proc/orient_objs(tx, ty, mx, my)
var/cx = tx
var/cy = ty
src.boxes.screen_loc = "[tx],[ty] to [mx],[my]"
for(var/obj/O in src.contents)
O.screen_loc = "[cx],[cy]"
O.layer = 20
cx++
if (cx > mx)
cx = tx
cy--
//Foreach goto(56)
src.closer.screen_loc = "[mx],[my]"
return
//This proc draws out the inventory and places the items on it. It uses the standard position.
/obj/item/weapon/secstorage/proc/standard_orient_objs()
var/rows = 0
var/cols = 6
var/cx = 4
var/cy = 2+rows
src.boxes.screen_loc = "4:16,2:16 to [4+cols]:16,[2+rows]:16"
for(var/obj/O in src.contents)
O.screen_loc = "[cx]:16,[cy]:16"
O.layer = 20
cx++
if (cx > (4+cols))
cx = 4
cy--
src.closer.screen_loc = "11:16,2:16"
return
/obj/item/weapon/secstorage/proc/orient2hud(mob/user as mob)
standard_orient_objs()
return
/obj/item/weapon/secstorage/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if ( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && (src.locked == 1) && (!src.emagged))
if(istype(W, /obj/item/weapon/card/emag))
var/obj/item/weapon/card/emag/E = W
if(E.uses)
E.uses--
else
return
emagged = 1
src.overlays += image('icons/obj/storage.dmi', icon_sparking)
sleep(6)
src.overlays = null
overlays += image('icons/obj/storage.dmi', icon_locking)
locked = 0
if(istype(W, /obj/item/weapon/melee/energy/blade))
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.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
user << "You slice through the lock on [src]."
else
user << "You short out the lock on [src]."
return
if ((W.w_class > internalstorage || istype(W, /obj/item/weapon/secstorage)))
return
if ((istype(W, /obj/item/weapon/screwdriver)) && (src.locked == 1))
sleep(6)
src.open =! src.open
user.show_message(text("\blue You [] the service panel.", (src.open ? "open" : "close")))
return
if ((istype(W, /obj/item/device/multitool)) && (src.open == 1) && (src.locked ==1) && (!src.l_hacking))
user.show_message(text("\red Now attempting to reset internal memory, please hold."), 1)
src.l_hacking = 1
if (do_after(usr, 100))
if (prob(40))
src.l_setshort = 1
src.l_set = 0
user.show_message(text("\red Internal memory reset. Please give it a few seconds to reinitialize."), 1)
sleep(80)
src.l_setshort = 0
src.l_hacking = 0
else
user.show_message(text("\red Unable to reset internal memory."), 1)
src.l_hacking = 0
else src.l_hacking = 0
return
if (src.contents.len >= 7)
return
if (src.locked == 1)
return
user.u_equip(W)
W.loc = src
if ((user.client && user.s_active != src))
user.client.screen -= W
src.orient2hud(user)
W.dropped(user)
add_fingerprint(user)
//if (istype(W, /obj/item/weapon/gun/energy/crossbow)) return //STEALTHY
for(var/mob/O in viewers(user, null))
O.show_message(text("\blue [] has added [] to []!", user, W, src), 1)
//Foreach goto(139)
return
/obj/item/weapon/secstorage/dropped(mob/user as mob)
standard_orient_objs()
return
/obj/item/weapon/secstorage/MouseDrop(over_object, src_location, over_location)
..()
if (src.locked == 1)
return
orient2hud(usr)
if ((over_object == usr && ((get_dist(src, usr) <= 1 ||src.locked == 0) || usr.contents.Find(src)))) //|| usr.telekinesis == 1
if (usr.s_active)
usr.s_active.close(usr)
src.show_to(usr)
return
/obj/item/weapon/secstorage/attack_paw(mob/user as mob)
playsound(src.loc, "rustle", 50, 1, -5)
return src.attack_hand(user)
return
/obj/item/weapon/secstorage/attack_hand(mob/user as mob)
if ((src.loc == user) && (src.locked == 1))
usr << "\red [src] is locked and cannot be opened!"
else if ((src.loc == user) && (!src.locked))
playsound(src.loc, "rustle", 50, 1, -5)
if (user.s_active == src)
user.s_active.close(user) //Close and re-open
src.show_to(user)
else
user.s_active.close(user) //Just close
else
..()
for(var/mob/M in range(1))
if (M.s_active == src)
src.close(M)
src.orient2hud(user)
src.add_fingerprint(user)
return
/obj/item/weapon/secstorage/attack_self(mob/user as mob)
user.machine = src
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED"))
var/message = "Code"
if ((src.l_set == 0) && (!src.emagged) && (!src.l_setshort))
dat += text("<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>")
if (src.emagged)
dat += text("<p>\n<font color=red><b>LOCKING SYSTEM ERROR - 1701</b></font>")
if (src.l_setshort)
dat += text("<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>")
message = text("[]", src.code)
if (!src.locked)
message = "*****"
dat += text("<HR>\n>[]<BR>\n<A href='?src=\ref[];type=1'>1</A>-<A href='?src=\ref[];type=2'>2</A>-<A href='?src=\ref[];type=3'>3</A><BR>\n<A href='?src=\ref[];type=4'>4</A>-<A href='?src=\ref[];type=5'>5</A>-<A href='?src=\ref[];type=6'>6</A><BR>\n<A href='?src=\ref[];type=7'>7</A>-<A href='?src=\ref[];type=8'>8</A>-<A href='?src=\ref[];type=9'>9</A><BR>\n<A href='?src=\ref[];type=R'>R</A>-<A href='?src=\ref[];type=0'>0</A>-<A href='?src=\ref[];type=E'>E</A><BR>\n</TT>", message, src, src, src, src, src, src, src, src, src, src, src, src)
user << browse(dat, "window=caselock;size=300x280")
/obj/item/weapon/secstorage/Topic(href, href_list)
..()
if ((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1))
return
if (href_list["type"])
if (href_list["type"] == "E")
if ((src.l_set == 0) && (length(src.code) == 5) && (!src.l_setshort) && (src.code != "ERROR"))
src.l_code = src.code
src.l_set = 1
else if ((src.code == src.l_code) && (src.emagged == 0) && (src.l_set == 1))
src.locked = 0
src.overlays = null
overlays += image('icons/obj/storage.dmi', icon_opened)
src.code = null
else
src.code = "ERROR"
else
if ((href_list["type"] == "R") && (src.emagged == 0) && (!src.l_setshort))
src.locked = 1
src.overlays = null
src.code = null
src.close(usr)
else
src.code += text("[]", href_list["type"])
if (length(src.code) > 5)
src.code = "ERROR"
src.add_fingerprint(usr)
for(var/mob/M in viewers(1, src.loc))
if ((M.client && M.machine == src))
src.attack_self(M)
return
return
/obj/item/weapon/secstorage/New()
src.boxes = new /obj/screen/storage( )
src.boxes.name = "storage"
src.boxes.master = src
src.boxes.icon_state = "block"
src.boxes.screen_loc = "7,7 to 10,8"
src.boxes.layer = 19
src.closer = new /obj/screen/close( )
src.closer.master = src
src.closer.icon_state = "x"
src.closer.layer = 20
spawn( 5 )
standard_orient_objs()
return
return
@@ -0,0 +1,25 @@
/obj/item/weapon/secstorage/ssafe
name = "secure safe"
icon = 'icons/obj/storage.dmi'
icon_state = "safe"
icon_opened = "safe0"
icon_locking = "safeb"
icon_sparking = "safespark"
flags = FPRINT | TABLEPASS
force = 8.0
w_class = 8.0
internalstorage = 8
anchored = 1.0
density = 0
/obj/item/weapon/secstorage/ssafe/New()
..()
new /obj/item/weapon/paper(src)
new /obj/item/weapon/pen(src)
/obj/item/weapon/secstorage/ssafe/HoS/New()
..()
//new /obj/item/weapon/storage/lockbox/clusterbang(src) This item is currently broken... and probably shouldnt exist to begin with (even though it's cool)
/obj/item/weapon/secstorage/ssafe/attack_hand(mob/user as mob)
return attack_self(user)
-197
View File
@@ -1,197 +0,0 @@
/obj/item/weapon/reagent_containers/spray
name = "spray bottle"
desc = "A spray bottle, with an unscrewable top."
icon = 'icons/obj/janitor.dmi'
icon_state = "cleaner"
item_state = "cleaner"
flags = TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY
slot_flags = SLOT_BELT
throwforce = 3
w_class = 2.0
throw_speed = 2
throw_range = 10
amount_per_transfer_from_this = 5
volume = 250
possible_transfer_amounts = null
/obj/item/weapon/reagent_containers/spray/afterattack(atom/A as mob|obj, mob/user as mob)
if(istype(A, /obj/item/weapon/storage) || istype(A, /obj/structure/table) || istype(A, /obj/structure/rack) || istype(A, /obj/structure/closet) \
|| istype(A, /obj/item/weapon/reagent_containers) || istype(A, /obj/structure/sink))
return
if(istype(A, /obj/effect/proc_holder/spell))
return
if(istype(A, /obj/structure/reagent_dispensers)) //this block copypasted from reagent_containers/glass, for lack of a better solution
if(!A.reagents.total_volume && A.reagents)
user << "<span class='notice'>\The [A] is empty.</span>"
return
if(reagents.total_volume >= reagents.maximum_volume)
user << "<span class='notice'>\The [src] is full.</span>"
return
var/trans = A.reagents.trans_to(src, A:amount_per_transfer_from_this)
user << "<span class='notice'>You fill \the [src] with [trans] units of the contents of \the [A].</span>"
return
if(reagents.total_volume < amount_per_transfer_from_this)
user << "<span class='notice'>\The [src] is empty!</span>"
return
var/obj/effect/decal/D = new/obj/effect/decal(get_turf(src))
D.create_reagents(amount_per_transfer_from_this)
reagents.trans_to(D, amount_per_transfer_from_this)
D.name = "chemicals"
D.icon = 'icons/obj/chempuff.dmi'
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
spawn(0)
for(var/i=0, i<3, i++)
step_towards(D,A)
D.reagents.reaction(get_turf(D))
for(var/atom/T in get_turf(D))
D.reagents.reaction(T)
sleep(3)
del(D)
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
if(reagents.has_reagent("sacid"))
message_admins("[key_name_admin(user)] fired sulphuric acid from a spray bottle.")
log_game("[key_name(user)] fired sulphuric acid from a spray bottle.")
if(reagents.has_reagent("pacid"))
message_admins("[key_name_admin(user)] fired Polyacid from a spray bottle.")
log_game("[key_name(user)] fired Polyacid from a spray bottle.")
if(reagents.has_reagent("lube"))
message_admins("[key_name_admin(user)] fired Space lube from a spray bottle.")
log_game("[key_name(user)] fired Space lube from a spray bottle.")
return
/obj/item/weapon/reagent_containers/spray/examine()
set src in usr
..()
for(var/datum/reagent/R in reagents.reagent_list)
usr << "[round(R.volume)] units of [R.name] left."
return
//space cleaner
/obj/item/weapon/reagent_containers/spray/cleaner
name = "space cleaner"
desc = "BLAM!-brand non-foaming space cleaner!"
/obj/item/weapon/reagent_containers/spray/cleaner/New()
..()
reagents.add_reagent("cleaner", 250)
//pepperspray
/obj/item/weapon/reagent_containers/spray/pepper
name = "pepperspray"
desc = "Manufactured by UhangInc, used to blind and down an opponent quickly."
icon = 'icons/obj/weapons.dmi'
icon_state = "pepperspray"
item_state = "pepperspray"
volume = 40
amount_per_transfer_from_this = 10
/obj/item/weapon/reagent_containers/spray/pepper/New()
..()
reagents.add_reagent("condensedcapsaicin", 40)
//chemsprayer
/obj/item/weapon/reagent_containers/spray/chemsprayer
name = "chem sprayer"
desc = "A utility used to spray large amounts of reagent in a given area."
icon = 'icons/obj/gun.dmi'
icon_state = "chemsprayer"
item_state = "chemsprayer"
throwforce = 3
w_class = 3.0
volume = 600
origin_tech = "combat=3;materials=3;engineering=3"
//this is a big copypasta clusterfuck, but it's still better than it used to be!
/obj/item/weapon/reagent_containers/spray/chemsprayer/afterattack(atom/A as mob|obj, mob/user as mob)
if(istype(A, /obj/item/weapon/storage) || istype(A, /obj/structure/table) || istype(A, /obj/structure/rack) || istype(A, /obj/structure/closet) \
|| istype(A, /obj/item/weapon/reagent_containers) || istype(A, /obj/structure/sink))
return
if(istype(A, /obj/effect/proc_holder/spell))
return
if(istype(A, /obj/structure/reagent_dispensers)) //this block copypasted from reagent_containers/glass, for lack of a better solution
if(!A.reagents.total_volume && A.reagents)
user << "<span class='notice'>\The [A] is empty.</span>"
return
if(reagents.total_volume >= reagents.maximum_volume)
user << "<span class='notice'>\The [src] is full.</span>"
return
var/trans = A.reagents.trans_to(src, A:amount_per_transfer_from_this)
user << "<span class='notice'>You fill \the [src] with [trans] units of the contents of \the [A].</span>"
return
if(reagents.total_volume < amount_per_transfer_from_this)
user << "<span class='notice'>\The [src] is empty!</span>"
return
var/Sprays[3]
for(var/i=1, i<=3, i++) // intialize sprays
if(src.reagents.total_volume < 1) break
var/obj/effect/decal/D = new/obj/effect/decal(get_turf(src))
D.name = "chemicals"
D.icon = 'icons/obj/chempuff.dmi'
D.create_reagents(amount_per_transfer_from_this)
src.reagents.trans_to(D, amount_per_transfer_from_this)
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
Sprays[i] = D
var/direction = get_dir(src, A)
var/turf/T = get_turf(A)
var/turf/T1 = get_step(T,turn(direction, 90))
var/turf/T2 = get_step(T,turn(direction, -90))
var/list/the_targets = list(T,T1,T2)
for(var/i=1, i<=Sprays.len, i++)
spawn()
var/obj/effect/decal/D = Sprays[i]
if(!D) continue
// Spreads the sprays a little bit
var/turf/my_target = pick(the_targets)
the_targets -= my_target
for(var/j=1, j<=rand(6,8), j++)
step_towards(D, my_target)
D.reagents.reaction(get_turf(D))
for(var/atom/t in get_turf(D))
D.reagents.reaction(t)
sleep(2)
del(D)
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
if(reagents.has_reagent("sacid"))
message_admins("[key_name_admin(user)] fired sulphuric acid from a chem sprayer.")
log_game("[key_name(user)] fired sulphuric acid from a chem sprayer.")
if(reagents.has_reagent("pacid"))
message_admins("[key_name_admin(user)] fired Polyacid from a chem sprayer.")
log_game("[key_name(user)] fired Polyacid from a chem sprayer.")
if(reagents.has_reagent("lube"))
message_admins("[key_name_admin(user)] fired Space lube from a chem sprayer.")
log_game("[key_name(user)] fired Space lube from a chem sprayer.")
return
//looking for plant-b-gone? it's in code/game/objects/items/weapons/hydroponics.dm
@@ -0,0 +1,86 @@
/obj/item/weapon/storage/MouseDrop(obj/over_object as obj)
if (ishuman(usr) || ismonkey(usr)) //so monkeys can take off their backpacks -- Urist
var/mob/M = usr
if (!( istype(over_object, /obj/screen) ))
return ..()
if (!(src.loc == usr) || (src.loc && src.loc.loc == usr))
return
playsound(src.loc, "rustle", 50, 1, -5)
if (!( M.restrained() ) && !( M.stat ))
switch(over_object.name)
if("r_hand")
M.u_equip(src)
M.put_in_r_hand(src)
if("l_hand")
M.u_equip(src)
M.put_in_l_hand(src)
M.update_inv_l_hand()
M.update_inv_r_hand()
src.add_fingerprint(usr)
return
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
if (usr.s_active)
usr.s_active.close(usr)
src.show_to(usr)
return
return
/obj/item/weapon/storage/backpack/attackby(obj/item/weapon/W as obj, mob/user as mob)
playsound(src.loc, "rustle", 50, 1, -5)
..()
/obj/item/weapon/storage/backpack/holding
name = "Bag of Holding"
desc = "A backpack that opens into a localized pocket of Blue Space."
origin_tech = "bluespace=4"
icon_state = "holdingpack"
max_w_class = 4
max_combined_w_class = 28
New()
..()
return
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(crit_fail)
user << "\red The Bluespace generator isn't working."
return
if(istype(W, /obj/item/weapon/storage/backpack/holding) && !W.crit_fail)
investigate_log("has become a singularity. Caused by [user.key]","singulo")
user << "\red The Bluespace interfaces of the two devices catastrophically malfunction!"
del(W)
var/obj/machinery/singularity/singulo = new /obj/machinery/singularity (get_turf(src))
singulo.energy = 300 //should make it a bit bigger~
message_admins("[key_name_admin(user)] detonated a bag of holding")
log_game("[key_name(user)] detonated a bag of holding")
del(src)
return
..()
proc/failcheck(mob/user as mob)
if (prob(src.reliability)) return 1 //No failure
if (prob(src.reliability))
user << "\red The Bluespace portal resists your attempt to add another item." //light failure
else
user << "\red The Bluespace generator malfunctions!"
for (var/obj/O in src.contents) //it broke, delete what was in it
del(O)
crit_fail = 1
icon_state = "brokenpack"
/obj/item/weapon/storage/backpack/santabag
name = "Santa's Gift Bag"
desc = "Space Santa uses this to deliver toys to all the nice children in space in Christmas! Wow, it's pretty big!"
icon_state = "giftbag0"
item_state = "giftbag"
w_class = 4.0
storage_slots = 20
max_w_class = 3
max_combined_w_class = 400 // can store a ton of shit!
New()
..()
return
@@ -0,0 +1,146 @@
/obj/item/weapon/storage/belt
name = "belt"
desc = "Can hold various things."
icon = 'icons/obj/clothing/belts.dmi'
icon_state = "utilitybelt"
item_state = "utility"
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
attack_verb = list("whipped", "lashed", "disciplined")
/obj/item/weapon/storage/belt/proc/can_use()
if(!ismob(loc)) return 0
var/mob/M = loc
if(src in M.get_equipped_items())
return 1
else
return 0
/obj/item/weapon/storage/belt/MouseDrop(obj/over_object as obj, src_location, over_location)
var/mob/M = usr
if(!istype(over_object, /obj/screen))
return ..()
playsound(src.loc, "rustle", 50, 1, -5)
if (!M.restrained() && !M.stat && can_use())
switch(over_object.name)
if("r_hand")
M.u_equip(src)
M.put_in_r_hand(src)
if("l_hand")
M.u_equip(src)
M.put_in_l_hand(src)
src.add_fingerprint(usr)
return
/obj/item/weapon/storage/belt/utility
name = "tool-belt" //Carn: utility belt is nicer, but it bamboozles the text parsing.
desc = "Can hold various tools."
icon_state = "utilitybelt"
item_state = "utility"
can_hold = list(
"/obj/item/weapon/crowbar",
"/obj/item/weapon/screwdriver",
"/obj/item/weapon/weldingtool",
"/obj/item/weapon/wirecutters",
"/obj/item/weapon/wrench",
"/obj/item/device/multitool",
"/obj/item/device/flashlight",
"/obj/item/weapon/cable_coil",
"/obj/item/device/t_scanner",
"/obj/item/device/analyzer")
/obj/item/weapon/storage/belt/utility/full/New()
..()
new /obj/item/weapon/screwdriver(src)
new /obj/item/weapon/wrench(src)
new /obj/item/weapon/weldingtool(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/weapon/wirecutters(src)
new /obj/item/weapon/cable_coil(src,30,pick("red","yellow","orange"))
/obj/item/weapon/storage/belt/utility/atmostech/New()
..()
new /obj/item/weapon/screwdriver(src)
new /obj/item/weapon/wrench(src)
new /obj/item/weapon/weldingtool(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/weapon/wirecutters(src)
new /obj/item/device/analyzer(src)
/obj/item/weapon/storage/belt/medical
name = "medical belt"
desc = "Can hold various medical equipment."
icon_state = "medicalbelt"
item_state = "medical"
can_hold = list(
"/obj/item/device/healthanalyzer",
"/obj/item/weapon/dnainjector",
"/obj/item/weapon/reagent_containers/dropper",
"/obj/item/weapon/reagent_containers/glass/beaker",
"/obj/item/weapon/reagent_containers/glass/bottle",
"/obj/item/weapon/reagent_containers/pill",
"/obj/item/weapon/reagent_containers/syringe",
"/obj/item/weapon/reagent_containers/glass/dispenser",
"/obj/item/weapon/lighter/zippo",
"/obj/item/weapon/cigpacket",
"/obj/item/weapon/storage/pill_bottle",
"/obj/item/stack/medical",
"/obj/item/device/flashlight/pen"
)
/obj/item/weapon/storage/belt/security
name = "security belt"
desc = "Can hold security gear like handcuffs and flashes."
icon_state = "securitybelt"
item_state = "security"//Could likely use a better one.
storage_slots = 4
can_hold = list(
"/obj/item/weapon/grenade/flashbang",
"/obj/item/weapon/reagent_containers/spray/pepper",
"/obj/item/weapon/handcuffs",
"/obj/item/device/flash",
"/obj/item/clothing/glasses",
"/obj/item/ammo_casing/shotgun",
"/obj/item/ammo_magazine",
"/obj/item/weapon/reagent_containers/food/snacks/donut/normal",
"/obj/item/weapon/reagent_containers/food/snacks/donut/jelly"
)
/obj/item/weapon/storage/belt/soulstone
name = "soul stone belt"
desc = "Designed for ease of access to the shards during a fight, as to not let a single enemy spirit slip away"
icon_state = "soulstonebelt"
item_state = "soulstonebelt"
storage_slots = 6
can_hold = list(
"/obj/item/device/soulstone"
)
/obj/item/weapon/storage/belt/soulstone/full/New()
..()
new /obj/item/device/soulstone(src)
new /obj/item/device/soulstone(src)
new /obj/item/device/soulstone(src)
new /obj/item/device/soulstone(src)
new /obj/item/device/soulstone(src)
new /obj/item/device/soulstone(src)
/obj/item/weapon/storage/belt/champion
name = "championship belt"
desc = "Proves to the world that you are the strongest!"
icon_state = "championbelt"
item_state = "champion"
storage_slots = 1
can_hold = list(
"/obj/item/clothing/mask/luchador"
)
@@ -0,0 +1,88 @@
/obj/item/weapon/storage/bible/booze/New()
..()
new /obj/item/weapon/reagent_containers/food/drinks/beer(src)
new /obj/item/weapon/reagent_containers/food/drinks/beer(src)
new /obj/item/weapon/spacecash(src)
new /obj/item/weapon/spacecash(src)
new /obj/item/weapon/spacecash(src)
/obj/item/weapon/storage/bible/proc/bless(mob/living/carbon/M as mob)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/heal_amt = 10
for(var/datum/organ/external/affecting in H.organs)
if(affecting.heal_damage(heal_amt, heal_amt))
H.UpdateDamageIcon()
return
/obj/item/weapon/storage/bible/attack(mob/living/M as mob, mob/living/user as mob)
var/chaplain = 0
if(user.mind && (user.mind.assigned_role == "Chaplain"))
chaplain = 1
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "\red You don't have the dexterity to do this!"
return
if(!chaplain)
user << "\red The book sizzles in your hands."
user.take_organ_damage(0,10)
return
if ((CLUMSY in user.mutations) && prob(50))
user << "\red The [src] slips out of your hand and hits your head."
user.take_organ_damage(10)
user.Paralyse(20)
return
// if(..() == BLOCKED)
// return
if (M.stat !=2)
if(M.mind && (M.mind.assigned_role == "Chaplain"))
user << "\red You can't heal yourself!"
return
/*if((M.mind in ticker.mode.cult) && (prob(20)))
M << "\red The power of [src.deity_name] clears your mind of heresy!"
user << "\red You see how [M]'s eyes become clear, the cult no longer holds control over him!"
ticker.mode.remove_cultist(M.mind)*/
if ((istype(M, /mob/living/carbon/human) && prob(60)))
bless(M)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] heals [] with the power of [src.deity_name]!</B>", user, M), 1)
M << "\red May the power of [src.deity_name] compel you to be healed!"
playsound(src.loc, "punch", 25, 1, -1)
else
if(ishuman(M) && !istype(M:head, /obj/item/clothing/head/helmet))
M.adjustBrainLoss(10)
M << "\red You feel dumber."
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] beats [] over the head with []!</B>", user, M, src), 1)
playsound(src.loc, "punch", 25, 1, -1)
else if(M.stat == 2)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] smacks []'s lifeless corpse with [].</B>", user, M, src), 1)
playsound(src.loc, "punch", 25, 1, -1)
return
/obj/item/weapon/storage/bible/afterattack(atom/A, mob/user as mob)
if (istype(A, /turf/simulated/floor))
user << "\blue You hit the floor with the bible."
if(user.mind && (user.mind.assigned_role == "Chaplain"))
call(/obj/effect/rune/proc/revealrunes)(src)
if(user.mind && (user.mind.assigned_role == "Chaplain"))
if(A.reagents && A.reagents.has_reagent("water")) //blesses all the water in the holder
user << "\blue You bless [A]."
var/water2holy = A.reagents.get_reagent_amount("water")
A.reagents.del_reagent("water")
A.reagents.add_reagent("holywater",water2holy)
/obj/item/weapon/storage/bible/attackby(obj/item/weapon/W as obj, mob/user as mob)
playsound(src.loc, "rustle", 50, 1, -5)
..()
@@ -0,0 +1,44 @@
/obj/item/weapon/storage/briefcase/New()
..()
new /obj/item/weapon/paper(src)
new /obj/item/weapon/paper(src)
new /obj/item/weapon/paper(src)
new /obj/item/weapon/paper(src)
new /obj/item/weapon/paper(src)
new /obj/item/weapon/paper(src)
new /obj/item/weapon/pen(src)
/obj/item/weapon/storage/briefcase/attack(mob/living/M as mob, mob/living/user as mob)
//..()
if ((CLUMSY in user.mutations) && prob(50))
user << "\red The [src] slips out of your hand and hits your head."
user.take_organ_damage(10)
user.Paralyse(2)
return
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
if (M.stat < 2 && M.health < 50 && prob(90))
var/mob/H = M
// ******* Check
if ((istype(H, /mob/living/carbon/human) && istype(H, /obj/item/clothing/head) && H.flags & 8 && prob(80)))
M << "\red The helmet protects you from being hit hard in the head!"
return
var/time = rand(2, 6)
if (prob(75))
M.Paralyse(time)
else
M.Stun(time)
if(M.stat != 2) M.stat = 1
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] has been knocked unconscious!</B>", M), 1, "\red You hear someone fall.", 2)
else
M << text("\red [] tried to knock you unconcious!",user)
M.eye_blurry += 3
return
@@ -0,0 +1,96 @@
/*
* The 'fancy' path is for objects like donut boxes that show how many items are in the storage item on the sprite itself
* .. Sorry for the shitty path name, I couldnt think of a better one.
*
* WARNING: var/icon_type is used for both examine text and sprite name. Please look at the procs below and adjust your sprite names accordingly
*
* Contains:
* Donut Box
* Egg Box
* Candle Box
*/
/obj/item/weapon/storage/fancy/
icon = 'icons/obj/food.dmi'
icon_state = "donutbox6"
name = "donut box"
var/icon_type = "donut"
/obj/item/weapon/storage/fancy/update_icon(var/itemremoved = 0)
var/total_contents = src.contents.len - itemremoved
src.icon_state = "[src.icon_type]box[total_contents]"
return
/obj/item/weapon/storage/fancy/examine()
set src in oview(1)
if(contents.len <= 0)
usr << "There are no [src.icon_type]s left in the box."
else if(contents.len == 1)
usr << "There is one [src.icon_type] left in the box."
else
usr << "There are [src.contents.len] [src.icon_type]s in the box."
return
/*
* Donut Box
*/
/obj/item/weapon/storage/fancy/donut_box
icon = 'icons/obj/food.dmi'
icon_state = "donutbox6"
icon_type = "donut"
name = "donut box"
storage_slots = 6
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/donut")
/obj/item/weapon/storage/fancy/donut_box/New()
..()
for(var/i=1; i <= storage_slots; i++)
new /obj/item/weapon/reagent_containers/food/snacks/donut/normal(src)
return
/*
* Egg Box
*/
/obj/item/weapon/storage/fancy/egg_box
icon = 'icons/obj/food.dmi'
icon_state = "eggbox"
icon_type = "egg"
name = "egg box"
storage_slots = 12
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/egg")
/obj/item/weapon/storage/fancy/egg_box/New()
..()
for(var/i=1; i <= storage_slots; i++)
new /obj/item/weapon/reagent_containers/food/snacks/egg(src)
return
/*
* Candle Box
*/
/obj/item/weapon/storage/fancy/candle_box
name = "Candle pack"
desc = "A pack of red candles."
icon = 'icons/obj/candle.dmi'
icon_state = "candlebox5"
icon_type = "candle"
item_state = "candlebox5"
storage_slots = 5
throwforce = 2
flags = TABLEPASS
slot_flags = SLOT_BELT
/obj/item/weapon/storage/fancy/candle_box/New()
..()
for(var/i=1; i <= storage_slots; i++)
new /obj/item/candle(src)
return
@@ -0,0 +1,133 @@
/obj/item/weapon/storage/firstaid/fire/New()
..()
if (empty) return
icon_state = pick("ointment","firefirstaid")
new /obj/item/device/healthanalyzer( src )
new /obj/item/stack/medical/ointment( src )
new /obj/item/stack/medical/ointment( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src ) //Replaced ointment with these since they actually work --Errorage
return
/obj/item/weapon/storage/syringes/New()
..()
new /obj/item/weapon/reagent_containers/syringe( src )
new /obj/item/weapon/reagent_containers/syringe( src )
new /obj/item/weapon/reagent_containers/syringe( src )
new /obj/item/weapon/reagent_containers/syringe( src )
new /obj/item/weapon/reagent_containers/syringe( src )
new /obj/item/weapon/reagent_containers/syringe( src )
new /obj/item/weapon/reagent_containers/syringe( src )
return
/obj/item/weapon/storage/firstaid/regular/New()
..()
if (empty) return
new /obj/item/weapon/reagent_containers/hypospray/autoinjector( src )
new /obj/item/stack/medical/bruise_pack(src)
new /obj/item/stack/medical/bruise_pack(src)
new /obj/item/stack/medical/bruise_pack(src)
new /obj/item/stack/medical/ointment(src)
new /obj/item/stack/medical/ointment(src)
new /obj/item/stack/medical/ointment(src)
return
/obj/item/weapon/storage/firstaid/toxin/New()
..()
if (empty) return
icon_state = pick("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3")
new /obj/item/device/healthanalyzer( src )
new /obj/item/weapon/reagent_containers/syringe/antitoxin( src )
new /obj/item/weapon/reagent_containers/syringe/antitoxin( src )
new /obj/item/weapon/reagent_containers/pill/antitox( src )
new /obj/item/weapon/reagent_containers/pill/antitox( src )
new /obj/item/weapon/reagent_containers/pill/antitox( src )
new /obj/item/weapon/reagent_containers/pill/antitox( src )
return
/obj/item/weapon/storage/firstaid/o2/New()
..()
if (empty) return
new /obj/item/device/healthanalyzer( src )
new /obj/item/weapon/reagent_containers/syringe/inaprovaline( src )
new /obj/item/weapon/reagent_containers/syringe/inaprovaline( src )
new /obj/item/weapon/reagent_containers/pill/dexalin( src )
new /obj/item/weapon/reagent_containers/pill/dexalin( src )
new /obj/item/weapon/reagent_containers/pill/dexalin( src )
new /obj/item/weapon/reagent_containers/pill/dexalin( src )
return
/obj/item/weapon/storage/firstaid/adv/New()
..()
if (empty) return
new /obj/item/weapon/reagent_containers/hypospray/autoinjector( src )
new /obj/item/stack/medical/advanced/bruise_pack(src)
new /obj/item/stack/medical/advanced/bruise_pack(src)
new /obj/item/stack/medical/advanced/bruise_pack(src)
new /obj/item/stack/medical/advanced/ointment(src)
new /obj/item/stack/medical/advanced/ointment(src)
new /obj/item/stack/medical/splint(src)
return
/obj/item/weapon/storage/pill_bottle/kelotane
name = "Pill bottle (kelotane)"
desc = "Contains pills used to treat burns."
/obj/item/weapon/storage/pill_bottle/kelotane/New()
..()
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
/obj/item/weapon/storage/pill_bottle/tramadol
name = "Pill bottle (tramadol)"
desc = "Contains painkiller pills."
/obj/item/weapon/storage/pill_bottle/tramadol/New()
..()
new /obj/item/weapon/reagent_containers/pill/tramadol( src )
new /obj/item/weapon/reagent_containers/pill/tramadol( src )
new /obj/item/weapon/reagent_containers/pill/tramadol( src )
new /obj/item/weapon/reagent_containers/pill/tramadol( src )
new /obj/item/weapon/reagent_containers/pill/tramadol( src )
new /obj/item/weapon/reagent_containers/pill/tramadol( src )
new /obj/item/weapon/reagent_containers/pill/tramadol( src )
/obj/item/weapon/storage/pill_bottle/antitox
name = "Pill bottle (Anti-toxin)"
desc = "Contains pills used to counter toxins."
/obj/item/weapon/storage/pill_bottle/antitox/New()
..()
new /obj/item/weapon/reagent_containers/pill/antitox( src )
new /obj/item/weapon/reagent_containers/pill/antitox( src )
new /obj/item/weapon/reagent_containers/pill/antitox( src )
new /obj/item/weapon/reagent_containers/pill/antitox( src )
new /obj/item/weapon/reagent_containers/pill/antitox( src )
new /obj/item/weapon/reagent_containers/pill/antitox( src )
new /obj/item/weapon/reagent_containers/pill/antitox( src )
/obj/item/weapon/storage/pill_bottle/inaprovaline
name = "Pill bottle (inaprovaline)"
desc = "Contains pills used to stabilize patients."
/obj/item/weapon/storage/pill_bottle/inaprovaline/New()
..()
new /obj/item/weapon/reagent_containers/pill/inaprovaline( src )
new /obj/item/weapon/reagent_containers/pill/inaprovaline( src )
new /obj/item/weapon/reagent_containers/pill/inaprovaline( src )
new /obj/item/weapon/reagent_containers/pill/inaprovaline( src )
new /obj/item/weapon/reagent_containers/pill/inaprovaline( src )
new /obj/item/weapon/reagent_containers/pill/inaprovaline( src )
new /obj/item/weapon/reagent_containers/pill/inaprovaline( src )
@@ -0,0 +1,209 @@
/obj/item/weapon/storage/lglo_kit/New()
new /obj/item/clothing/gloves/latex(src)
new /obj/item/clothing/gloves/latex(src)
new /obj/item/clothing/gloves/latex(src)
new /obj/item/clothing/gloves/latex(src)
new /obj/item/clothing/gloves/latex(src)
new /obj/item/clothing/gloves/latex(src)
new /obj/item/clothing/gloves/latex(src)
..()
return
/obj/item/weapon/storage/blankbox/New()
new /obj/item/ammo_casing/shotgun/blank(src)
new /obj/item/ammo_casing/shotgun/blank(src)
new /obj/item/ammo_casing/shotgun/blank(src)
new /obj/item/ammo_casing/shotgun/blank(src)
new /obj/item/ammo_casing/shotgun/blank(src)
new /obj/item/ammo_casing/shotgun/blank(src)
new /obj/item/ammo_casing/shotgun/blank(src)
..()
return
/obj/item/weapon/storage/flashbang_kit/New()
new /obj/item/weapon/grenade/flashbang(src)
new /obj/item/weapon/grenade/flashbang(src)
new /obj/item/weapon/grenade/flashbang(src)
new /obj/item/weapon/grenade/flashbang(src)
new /obj/item/weapon/grenade/flashbang(src)
new /obj/item/weapon/grenade/flashbang(src)
new /obj/item/weapon/grenade/flashbang(src)
..()
return
/obj/item/weapon/storage/emp_kit/New()
new /obj/item/weapon/grenade/empgrenade(src)
new /obj/item/weapon/grenade/empgrenade(src)
new /obj/item/weapon/grenade/empgrenade(src)
new /obj/item/weapon/grenade/empgrenade(src)
new /obj/item/weapon/grenade/empgrenade(src)
..()
return
/obj/item/weapon/storage/stma_kit/New()
new /obj/item/clothing/mask/surgical(src)
new /obj/item/clothing/mask/surgical(src)
new /obj/item/clothing/mask/surgical(src)
new /obj/item/clothing/mask/surgical(src)
new /obj/item/clothing/mask/surgical(src)
new /obj/item/clothing/mask/surgical(src)
new /obj/item/clothing/mask/surgical(src)
..()
return
/obj/item/weapon/storage/gl_kit/New()
new /obj/item/clothing/glasses/regular(src)
new /obj/item/clothing/glasses/regular(src)
new /obj/item/clothing/glasses/regular(src)
new /obj/item/clothing/glasses/regular(src)
new /obj/item/clothing/glasses/sunglasses/prescription(src)
new /obj/item/clothing/glasses/sunglasses/prescription(src)
new /obj/item/clothing/glasses/meson/prescription(src)
..()
return
/obj/item/weapon/storage/trackimp_kit/New()
new /obj/item/weapon/implantcase/tracking(src)
new /obj/item/weapon/implantcase/tracking(src)
new /obj/item/weapon/implantcase/tracking(src)
new /obj/item/weapon/implantcase/tracking(src)
new /obj/item/weapon/implanter(src)
new /obj/item/weapon/implantpad(src)
new /obj/item/weapon/locator(src)
..()
return
/obj/item/weapon/storage/chemimp_kit/New()
new /obj/item/weapon/implantcase/chem(src)
new /obj/item/weapon/implantcase/chem(src)
new /obj/item/weapon/implantcase/chem(src)
new /obj/item/weapon/implantcase/chem(src)
new /obj/item/weapon/implantcase/chem(src)
new /obj/item/weapon/implanter(src)
new /obj/item/weapon/implantpad(src)
..()
return
/obj/item/weapon/storage/injectbox/New()
new /obj/item/weapon/dnainjector/h2m(src)
new /obj/item/weapon/dnainjector/h2m(src)
new /obj/item/weapon/dnainjector/h2m(src)
new /obj/item/weapon/dnainjector/m2h(src)
new /obj/item/weapon/dnainjector/m2h(src)
new /obj/item/weapon/dnainjector/m2h(src)
..()
return
/obj/item/weapon/storage/fcard_kit/New()
new /obj/item/weapon/f_card(src)
new /obj/item/weapon/f_card(src)
new /obj/item/weapon/f_card(src)
new /obj/item/weapon/f_card(src)
new /obj/item/weapon/f_card(src)
new /obj/item/weapon/f_card(src)
new /obj/item/weapon/f_card(src)
..()
return
/obj/item/weapon/storage/id_kit/New()
new /obj/item/weapon/card/id(src)
new /obj/item/weapon/card/id(src)
new /obj/item/weapon/card/id(src)
new /obj/item/weapon/card/id(src)
new /obj/item/weapon/card/id(src)
new /obj/item/weapon/card/id(src)
new /obj/item/weapon/card/id(src)
..()
return
/obj/item/weapon/storage/handcuff_kit/New()
new /obj/item/weapon/handcuffs(src)
new /obj/item/weapon/handcuffs(src)
new /obj/item/weapon/handcuffs(src)
new /obj/item/weapon/handcuffs(src)
new /obj/item/weapon/handcuffs(src)
new /obj/item/weapon/handcuffs(src)
new /obj/item/weapon/handcuffs(src)
..()
return
/obj/item/weapon/storage/seccart_kit/New()
new /obj/item/weapon/cartridge/security(src)
new /obj/item/weapon/cartridge/security(src)
new /obj/item/weapon/cartridge/security(src)
new /obj/item/weapon/cartridge/security(src)
new /obj/item/weapon/cartridge/security(src)
new /obj/item/weapon/cartridge/security(src)
new /obj/item/weapon/cartridge/security(src)
..()
return
/obj/item/weapon/storage/donkpocket_kit/New()
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
..()
return
/obj/item/weapon/storage/condimentbottles/New()
new /obj/item/weapon/reagent_containers/food/condiment(src)
new /obj/item/weapon/reagent_containers/food/condiment(src)
new /obj/item/weapon/reagent_containers/food/condiment(src)
new /obj/item/weapon/reagent_containers/food/condiment(src)
new /obj/item/weapon/reagent_containers/food/condiment(src)
new /obj/item/weapon/reagent_containers/food/condiment(src)
..()
return
/obj/item/weapon/storage/drinkingglasses/New()
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass(src)
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass(src)
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass(src)
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass(src)
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass(src)
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass(src)
..()
return
/*
/obj/item/weapon/storage/disk_kit/disks/New()
new /obj/item/weapon/card/data(src)
new /obj/item/weapon/card/data(src)
new /obj/item/weapon/card/data(src)
new /obj/item/weapon/card/data(src)
new /obj/item/weapon/card/data(src)
new /obj/item/weapon/card/data(src)
new /obj/item/weapon/card/data(src)
..()
return
/obj/item/weapon/storage/disk_kit/disks2/New()
spawn( 2 )
for(var/obj/item/weapon/card/data/D in src.loc)
D.loc = src
//Foreach goto(23)
return
..()
return
*/
@@ -0,0 +1,88 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/item/weapon/storage/lockbox
name = "lockbox"
desc = "A locked box."
icon_state = "lockbox+l"
item_state = "syringe_kit"
w_class = 4
max_w_class = 3
max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
storage_slots = 4
req_access = list(access_armory)
var/locked = 1
var/broken = 0
var/icon_locked = "lockbox+l"
var/icon_closed = "lockbox"
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)
user << "\red It appears to be broken."
return
if(src.allowed(user))
src.locked = !( src.locked )
if(src.locked)
src.icon_state = src.icon_locked
user << "\red You lock the [src.name]!"
return
else
src.icon_state = src.icon_closed
user << "\red You unlock the [src.name]!"
return
else
user << "\red Access Denied"
else if((istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = src.icon_broken
if(istype(W, /obj/item/weapon/melee/energy/blade))
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.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
for(var/mob/O in viewers(user, 3))
O.show_message(text("\blue The locker has been sliced open by [] with an energy blade!", user), 1, text("\red You hear metal being sliced and sparks flying."), 2)
else
for(var/mob/O in viewers(user, 3))
O.show_message(text("\blue The locker has been broken by [] with an electromagnetic card!", user), 1, text("You hear a faint electrical spark."), 2)
if(!locked)
..()
else
user << "\red Its locked!"
return
show_to(mob/user as mob)
if(locked)
user << "\red Its locked!"
else
..()
return
/obj/item/weapon/storage/lockbox/loyalty
name = "Lockbox (Loyalty Implants)"
req_access = list(access_security)
New()
..()
new /obj/item/weapon/implantcase/loyalty(src)
new /obj/item/weapon/implantcase/loyalty(src)
new /obj/item/weapon/implantcase/loyalty(src)
new /obj/item/weapon/implanter/loyalty(src)
/obj/item/weapon/storage/lockbox/clusterbang
name = "lockbox (clusterbang)"
desc = "You have a bad feeling about opening this."
req_access = list(access_security)
New()
..()
new /obj/item/weapon/grenade/flashbang/clusterbang(src)
@@ -0,0 +1,104 @@
/*
* Contains:
* Monkey Cube Box
* Candle Packs
* Snap Pop Box
* Crayon Box
*/
/*
* Monkey Cube Box
*/
/obj/item/weapon/storage/monkeycube_box
name = "monkey cube box"
desc = "Drymate brand monkey cubes. Just add water!"
icon = 'icons/obj/food.dmi'
icon_state = "monkeycubebox"
storage_slots = 7
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/monkeycube")
/obj/item/weapon/storage/monkeycube_box/New()
..()
new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped(src)
new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped(src)
return
/*
* Snap Pop Box
*/
/obj/item/weapon/storage/snappopbox
name = "snap pop box"
desc = "Eight wrappers of fun! Ages 8 and up. Not suitable for children."
icon = 'icons/obj/toy.dmi'
icon_state = "spbox"
storage_slots = 8
can_hold = list("/obj/item/toy/snappop")
/obj/item/weapon/storage/snappopbox/New()
..()
for(var/i=1; i <= storage_slots; i++)
new /obj/item/toy/snappop(src)
/*
* Match Box
*/
/obj/item/weapon/storage/matchbox
name = "Matchbox"
desc = "A small box of Almost But Not Quite Plasma Premium Matches."
icon = 'icons/obj/cigarettes.dmi'
icon_state = "matchbox"
item_state = "zippo"
storage_slots = 10
w_class = 1
flags = TABLEPASS
slot_flags = SLOT_BELT
/obj/item/weapon/storage/matchbox/New()
..()
for(var/i=1; i <= storage_slots; i++)
new /obj/item/weapon/match(src)
return
/obj/item/weapon/storage/matchbox/attackby(obj/item/weapon/match/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/match) && W.lit == 0)
W.lit = 1
W.icon_state = "match_lit"
processing_objects.Add(W)
W.update_icon()
return
/*
* Crayon Box
*/
/obj/item/weapon/storage/crayonbox/New()
..()
new /obj/item/toy/crayon/red(src)
new /obj/item/toy/crayon/orange(src)
new /obj/item/toy/crayon/yellow(src)
new /obj/item/toy/crayon/green(src)
new /obj/item/toy/crayon/blue(src)
new /obj/item/toy/crayon/purple(src)
update_icon()
/obj/item/weapon/storage/crayonbox/update_icon()
overlays = list() //resets list
overlays += image('icons/obj/crayons.dmi',"crayonbox")
for(var/obj/item/toy/crayon/crayon in contents)
overlays += image('icons/obj/crayons.dmi',crayon.colourName)
/obj/item/weapon/storage/crayonbox/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/toy/crayon))
switch(W:colourName)
if("mime")
usr << "This crayon is too sad to be contained in this box."
return
if("rainbow")
usr << "This crayon is too powerful to be contained in this box."
return
..()
@@ -0,0 +1,557 @@
/obj/item/weapon/storage
icon = 'icons/obj/storage.dmi'
name = "storage"
var/list/can_hold = new/list() //List of objects which this item can store (if set, it can't store anything else)
var/list/cant_hold = new/list() //List of objects which this item can't store (in effect only if can_hold isn't set)
var/max_w_class = 2 //Max size of objects that this object can store (in effect only if can_hold isn't set)
var/max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
var/storage_slots = 7 //The number of storage slots in this container.
var/obj/screen/storage/boxes = null
var/obj/screen/close/closer = null
var/use_to_pickup //Set this to make it possible to use this item in an inverse way, so you can have the item in your hand and click items on the floor to pick them up.
var/display_contents_with_number //Set this to make the storage item group contents of the same type and display them as a number.
var/allow_quick_empty //Set this variable to allow the object to have the 'empty' verb, which dumps all the contents on the floor.
var/allow_quick_gather //Set this variable to allow the object to have the 'toggle mode' verb, which quickly collects all items from a tile.
var/collection_mode = 1; //0 = pick one at a time, 1 = pick all on tile
w_class = 3.0
var/foldable = null // BubbleWrap - if set, can be folded (when empty) into a sheet of cardboard
/obj/item/weapon/storage/proc/return_inv()
var/list/L = list( )
L += src.contents
for(var/obj/item/weapon/storage/S in src)
L += S.return_inv()
for(var/obj/item/weapon/gift/G in src)
L += G.gift
if (istype(G.gift, /obj/item/weapon/storage))
L += G.gift:return_inv()
return L
/obj/item/weapon/storage/proc/show_to(mob/user as mob)
if(user.s_active)
user.s_active.hide_from(user)
for(var/obj/item/weapon/mousetrap/MT in src)
if(MT.armed)
for(var/mob/O in viewers(user, null))
if(O == user)
user.show_message(text("\red <B>You reach into the [src.name], but there was a live mousetrap in there!</B>"), 1)
else
user.show_message(text("\red <B>[user] reaches into the [src.name] and sets off a hidden mousetrap!</B>"), 1)
user.drop_from_inventory(MT)
MT.triggered(user, user.hand ? "l_hand" : "r_hand")
return
user.client.screen -= src.boxes
user.client.screen -= src.closer
user.client.screen -= src.contents
user.client.screen += src.boxes
user.client.screen += src.closer
user.client.screen += src.contents
user.s_active = src
return
/obj/item/weapon/storage/proc/hide_from(mob/user as mob)
if(!user.client)
return
user.client.screen -= src.boxes
user.client.screen -= src.closer
user.client.screen -= src.contents
if(user.s_active == src)
user.s_active = null
return
/obj/item/weapon/storage/proc/close(mob/user as mob)
src.hide_from(user)
user.s_active = null
return
//This proc draws out the inventory and places the items on it. tx and ty are the upper left tile and mx, my are the bottm right.
//The numbers are calculated from the bottom-left The bottom-left slot being 1,1.
/obj/item/weapon/storage/proc/orient_objs(tx, ty, mx, my)
var/cx = tx
var/cy = ty
src.boxes.screen_loc = "[tx]:,[ty] to [mx],[my]"
for(var/obj/O in src.contents)
O.screen_loc = "[cx],[cy]"
O.layer = 20
cx++
if (cx > mx)
cx = tx
cy--
src.closer.screen_loc = "[mx+1],[my]"
return
//This proc draws out the inventory and places the items on it. It uses the standard position.
/obj/item/weapon/storage/proc/standard_orient_objs(var/rows, var/cols, var/list/obj/item/display_contents)
var/cx = 4
var/cy = 2+rows
src.boxes.screen_loc = "4:16,2:16 to [4+cols]:16,[2+rows]:16"
if(display_contents_with_number)
for(var/datum/numbered_display/ND in display_contents)
ND.sample_object.screen_loc = "[cx]:16,[cy]:16"
ND.sample_object.maptext = "<font color='white'>[(ND.number > 1)? "[ND.number]" : ""]</font>"
ND.sample_object.layer = 20
cx++
if (cx > (4+cols))
cx = 4
cy--
else
for(var/obj/O in contents)
O.screen_loc = "[cx]:16,[cy]:16"
O.maptext = ""
O.layer = 20
cx++
if (cx > (4+cols))
cx = 4
cy--
src.closer.screen_loc = "[4+cols+1]:16,2:16"
return
/datum/numbered_display
var/obj/item/sample_object
var/number
New(obj/item/sample as obj)
if(!istype(sample))
del(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)
var/adjusted_contents = contents.len
//Numbered contents display
var/list/datum/numbered_display/numbered_contents
if(display_contents_with_number)
numbered_contents = list()
adjusted_contents = 0
for(var/obj/item/I in contents)
var/found = 0
for(var/datum/numbered_display/ND in numbered_contents)
if(ND.sample_object.type == I.type)
ND.number++
found = 1
break
if(!found)
adjusted_contents++
numbered_contents.Add( new/datum/numbered_display(I) )
//var/mob/living/carbon/human/H = user
var/row_num = 0
var/col_count = min(7,storage_slots) -1
if (adjusted_contents > 7)
row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width.
src.standard_orient_objs(row_num, col_count, numbered_contents)
return
//This proc return 1 if the item can be picked up and 0 if it can't.
//Set the stop_messages to stop it from printing emssages
/obj/item/weapon/storage/proc/can_be_inserted(obj/item/W as obj, stop_messages = 0)
if(!istype(W)) return //Not an item
if(src.loc == W)
return 0 //Means the item is already in the storage item
if(contents.len >= storage_slots)
if(!stop_messages)
usr << "\red The [src] is full, make some space."
return 0 //Storage item is full
if(can_hold.len)
var/ok = 0
for(var/A in can_hold)
if(istype(W, text2path(A) ))
ok = 1
break
if(!ok)
if(!stop_messages)
usr << "\red This [src] cannot hold [W]."
return 0
for(var/A in cant_hold) //Check for specific items which this container can't hold.
if(istype(W, text2path(A) ))
if(!stop_messages)
usr << "\red This [src] cannot hold [W]."
return 0
if (W.w_class > max_w_class)
if(!stop_messages)
usr << "\red This [W] is too big for this [src]"
return 0
var/sum_w_class = W.w_class
for(var/obj/item/I in contents)
sum_w_class += I.w_class //Adds up the combined w_classes which will be in the storage item if the item is added to it.
if(sum_w_class > max_combined_w_class)
if(!stop_messages)
usr << "\red The [src] is full, make some space."
return 0
if(W.w_class >= src.w_class && (istype(W, /obj/item/weapon/storage)))
if(!istype(src, /obj/item/weapon/storage/backpack/holding)) //bohs should be able to hold backpacks again. The override for putting a boh in a boh is in backpack.dm.
if(!stop_messages)
usr << "\red The [src] cannot hold [W] as it's a storage item of the same size."
return 0 //To prevent the stacking of same sized storage items.
return 1
//This proc handles items being inserted. It does not perform any checks of whether an item can or can't be inserted. That's done by can_be_inserted()
//The stop_warning parameter will stop the insertion message from being displayed. It is intended for cases where you are inserting multiple items at once,
//such as when picking up all the items on a tile with one click.
/obj/item/weapon/storage/proc/handle_item_insertion(obj/item/W as obj, prevent_warning = 0)
if(!istype(W)) return
if(usr)
usr.u_equip(W)
usr.update_icons() //update our overlays
W.loc = src
W.on_enter_storage(src)
if(usr)
if (usr.client && usr.s_active != src)
usr.client.screen -= W
W.dropped(usr)
add_fingerprint(usr)
if(!prevent_warning && !istype(W, /obj/item/weapon/gun/energy/crossbow))
for(var/mob/M in viewers(usr, null))
if (M == usr)
usr << "\blue You put the [W] into [src]."
else if (M in range(1)) //If someone is standing close enough, they can tell what it is...
M.show_message("\blue [usr] puts [W] into [src].")
else if (W && W.w_class >= 3.0) //Otherwise they can only see large or normal items from a distance...
M.show_message("\blue [usr] puts [W] into [src].")
src.orient2hud(usr)
if(usr.s_active)
usr.s_active.show_to(usr)
update_icon()
//Call this proc to handle the removal of an item from the storage item. The item will be moved to the atom sent as new_target
/obj/item/weapon/storage/proc/remove_from_storage(obj/item/W as obj, atom/new_location)
if(!istype(W)) return
if(istype(src, /obj/item/weapon/storage/fancy))
var/obj/item/weapon/storage/fancy/F = src
F.update_icon(1)
for(var/mob/M in range(1, src.loc))
if (M.s_active == src.loc)
if (M.client)
M.client.screen -= src
if(new_location)
if(ismob(loc))
W.dropped(usr)
if(ismob(new_location))
W.layer = 20
else
W.layer = initial(W.layer)
W.loc = new_location
else
W.loc = get_turf(src)
if(usr)
src.orient2hud(usr)
if(usr.s_active)
usr.s_active.show_to(usr)
if(W.maptext)
W.maptext = ""
W.on_exit_storage(src)
update_icon()
//This proc is called when you want to place an item into the storage item.
/obj/item/weapon/storage/attackby(obj/item/W as obj, mob/user as mob)
..()
if(isrobot(user))
user << "\blue You're a robot. No."
return //Robots can't interact with storage items.
if(!can_be_inserted(W))
return
if(istype(W, /obj/item/weapon/tray))
var/obj/item/weapon/tray/T = W
if(T.calc_carry() > 0)
if(prob(85))
user << "\red The tray won't fit in [src]."
return
else
W.loc = user.loc
if ((user.client && user.s_active != src))
user.client.screen -= W
W.dropped(user)
user << "\red God damnit!"
handle_item_insertion(W)
return
/obj/item/weapon/storage/dropped(mob/user as mob)
return
/obj/item/weapon/storage/MouseDrop(over_object, src_location, over_location)
..()
orient2hud(usr)
if ((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
if (usr.s_active)
usr.s_active.close(usr)
src.show_to(usr)
return
/obj/item/weapon/storage/attack_hand(mob/user as mob)
playsound(src.loc, "rustle", 50, 1, -5)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.l_store == src && !H.get_active_hand()) //Prevents opening if it's in a pocket.
H.put_in_hands(src)
H.l_store = null
return
if(H.r_store == src && !H.get_active_hand())
H.put_in_hands(src)
H.r_store = null
return
src.orient2hud(user)
if (src.loc == user)
if (user.s_active)
user.s_active.close(user)
src.show_to(user)
else
..()
for(var/mob/M in range(1))
if (M.s_active == src)
src.close(M)
src.add_fingerprint(user)
return
/obj/item/weapon/storage/verb/toggle_gathering_mode()
set name = "Switch Gathering Method"
set category = "Object"
collection_mode = !collection_mode
switch (collection_mode)
if(1)
usr << "The [src] now picks up all ore in a tile at once."
if(0)
usr << "The [src] now picks up one ore at a time."
/obj/item/weapon/storage/verb/quick_empty()
set name = "Empty Contents"
set category = "Object"
if(!ishuman(usr) || usr.stat || usr.restrained())
return
var/turf/T = get_turf(src)
for(var/obj/item/I in contents)
remove_from_storage(I, T)
/obj/item/weapon/storage/New()
if(allow_quick_empty)
verbs += /obj/item/weapon/storage/verb/quick_empty
else
verbs -= /obj/item/weapon/storage/verb/quick_empty
if(allow_quick_gather)
verbs += /obj/item/weapon/storage/verb/toggle_gathering_mode
else
verbs -= /obj/item/weapon/storage/verb/toggle_gathering_mode
src.boxes = new /obj/screen/storage( )
src.boxes.name = "storage"
src.boxes.master = src
src.boxes.icon_state = "block"
src.boxes.screen_loc = "7,7 to 10,8"
src.boxes.layer = 19
src.closer = new /obj/screen/close( )
src.closer.master = src
src.closer.icon_state = "x"
src.closer.layer = 20
orient2hud()
return
/obj/item/weapon/storage/emp_act(severity)
if(!istype(src.loc, /mob/living))
for(var/obj/O in contents)
O.emp_act(severity)
..()
// BubbleWrap - A box can be folded up to make card
/obj/item/weapon/storage/attack_self(mob/user as mob)
//Clicking on itself will empty it, if it has the verb to do that.
if(user.get_active_hand() == src)
if(src.verbs.Find(/obj/item/weapon/storage/verb/quick_empty))
src.quick_empty()
return
//Otherwise we'll try to fold it.
if ( contents.len )
return
if ( !ispath(src.foldable) )
return
var/found = 0
// Close any open UI windows first
for(var/mob/M in range(1))
if (M.s_active == src)
src.close(M)
if ( M == user )
found = 1
if ( !found ) // User is too far away
return
// Now make the cardboard
user << "\blue You fold [src] flat."
new src.foldable(get_turf(src))
del(src)
//BubbleWrap END
/obj/item/weapon/storage/box/
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/box/survival/New()
..()
contents = list()
sleep(1)
new /obj/item/clothing/mask/breath( src )
new /obj/item/weapon/tank/emergency_oxygen( src )
return
/obj/item/weapon/storage/box/engineer/New()
..()
contents = list()
sleep(1)
new /obj/item/clothing/mask/breath( src )
new /obj/item/weapon/tank/emergency_oxygen/engi( src )
return
/obj/item/weapon/storage/box/syndicate/New()
..()
switch (pickweight(list("bloodyspai" = 1, "stealth" = 1, "screwed" = 1, "guns" = 1, "murder" = 1, "freedom" = 1, "hacker" = 1, "lordsingulo" = 1)))
if ("bloodyspai")
new /obj/item/clothing/under/chameleon(src)
new /obj/item/clothing/mask/gas/voice(src)
new /obj/item/weapon/card/id/syndicate(src)
new /obj/item/clothing/shoes/syndigaloshes(src)
return
if ("stealth")
new /obj/item/weapon/gun/energy/crossbow(src)
new /obj/item/weapon/pen/paralysis(src)
new /obj/item/device/chameleon(src)
return
if ("screwed")
new /obj/effect/spawner/newbomb/timer/syndicate(src)
new /obj/effect/spawner/newbomb/timer/syndicate(src)
new /obj/item/device/powersink(src)
new /obj/item/clothing/suit/space/syndicate(src)
new /obj/item/clothing/head/helmet/space/syndicate(src)
return
if ("guns")
new /obj/item/weapon/gun/projectile(src)
new /obj/item/ammo_magazine/a357(src)
new /obj/item/weapon/card/emag(src)
new /obj/item/weapon/plastique(src)
return
if ("murder")
new /obj/item/weapon/melee/energy/sword(src)
new /obj/item/clothing/glasses/thermal/syndi(src)
new /obj/item/weapon/card/emag(src)
new /obj/item/clothing/shoes/syndigaloshes(src)
return
if("freedom")
var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(src)
O.imp = new /obj/item/weapon/implant/freedom(O)
var/obj/item/weapon/implanter/U = new /obj/item/weapon/implanter(src)
U.imp = new /obj/item/weapon/implant/uplink(U)
return
if ("hacker")
new /obj/item/weapon/aiModule/syndicate(src)
new /obj/item/weapon/card/emag(src)
new /obj/item/device/encryptionkey/binary(src)
return
if ("lordsingulo")
new /obj/item/device/radio/beacon/syndicate(src)
new /obj/item/clothing/suit/space/syndicate(src)
new /obj/item/clothing/head/helmet/space/syndicate(src)
new /obj/item/weapon/card/emag(src)
return
/obj/item/weapon/storage/dice/New()
new /obj/item/weapon/dice( src )
new /obj/item/weapon/dice/d20( src )
..()
return
/obj/item/weapon/storage/mousetraps/New()
new /obj/item/weapon/mousetrap( src )
new /obj/item/weapon/mousetrap( src )
new /obj/item/weapon/mousetrap( src )
new /obj/item/weapon/mousetrap( src )
new /obj/item/weapon/mousetrap( src )
new /obj/item/weapon/mousetrap( src )
..()
return
/obj/item/weapon/storage/pill_bottle/MouseDrop(obj/over_object as obj) //Quick pillbottle fix. -Agouri
if (ishuman(usr) || ismonkey(usr)) //Can monkeys even place items in the pocket slots? Leaving this in just in case~
var/mob/M = usr
if (!( istype(over_object, /obj/screen) ))
return ..()
if ((!( M.restrained() ) && !( M.stat ) /*&& M.pocket == src*/))
switch(over_object.name)
if("r_hand")
M.u_equip(src)
M.put_in_r_hand(src)
if("l_hand")
M.u_equip(src)
M.put_in_l_hand(src)
src.add_fingerprint(usr)
return
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
if (usr.s_active)
usr.s_active.close(usr)
src.show_to(usr)
return
return ///////////////////////////////////////////////////////Alright, that should do it. *MARKER* for any possible runtimes
/obj/item/weapon/storage/pill_bottle/verb/toggle_mode()
set name = "Switch Pill Bottle Method"
set category = "Object"
mode = !mode
switch (mode)
if(1)
usr << "The pill bottle now picks up all pills in a tile at once."
if(0)
usr << "The pill bottle now picks up one pill at a time."
/obj/item/weapon/storage/pillbottlebox/New()
new /obj/item/weapon/storage/pill_bottle( src )
new /obj/item/weapon/storage/pill_bottle( src )
new /obj/item/weapon/storage/pill_bottle( src )
new /obj/item/weapon/storage/pill_bottle( src )
new /obj/item/weapon/storage/pill_bottle( src )
new /obj/item/weapon/storage/pill_bottle( src )
new /obj/item/weapon/storage/pill_bottle( src )
..()
return
////////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,41 @@
/obj/item/weapon/storage/toolbox/emergency/New()
..()
new /obj/item/weapon/crowbar/red(src)
new /obj/item/weapon/extinguisher/mini(src)
if(prob(50))
new /obj/item/device/flashlight(src)
new /obj/item/device/radio(src)
/obj/item/weapon/storage/toolbox/mechanical/New()
..()
new /obj/item/weapon/screwdriver(src)
new /obj/item/weapon/wrench(src)
new /obj/item/weapon/weldingtool(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/device/analyzer(src)
new /obj/item/weapon/wirecutters(src)
/obj/item/weapon/storage/toolbox/electrical/New()
..()
var/color = pick("red","yellow","green","blue","pink","orange","cyan","white")
new /obj/item/weapon/screwdriver(src)
new /obj/item/weapon/wirecutters(src)
new /obj/item/device/t_scanner(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/weapon/cable_coil(src,30,color)
new /obj/item/weapon/cable_coil(src,30,color)
if(prob(5))
new /obj/item/clothing/gloves/yellow(src)
else
new /obj/item/weapon/cable_coil(src,30,color)
/obj/item/weapon/storage/toolbox/syndicate/New()
..()
var/color = pick("red","yellow","green","blue","pink","orange","cyan","white")
new /obj/item/weapon/screwdriver(src)
new /obj/item/weapon/wrench(src)
new /obj/item/weapon/weldingtool(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/weapon/cable_coil(src,30,color)
new /obj/item/weapon/wirecutters(src)
new /obj/item/device/multitool(src)
@@ -0,0 +1,53 @@
/obj/item/weapon/storage/syndie_kit
name = "Box"
desc = "A sleek, sturdy box"
icon_state = "box_of_doom"
item_state = "syringe_kit"
/obj/item/weapon/storage/syndie_kit/imp_freedom
name = "Freedom Implant (with injector)"
/obj/item/weapon/storage/syndie_kit/imp_freedom/New()
var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(src)
O.imp = new /obj/item/weapon/implant/freedom(O)
O.update()
..()
return
/*/obj/item/weapon/storage/syndie_kit/imp_compress
name = "Compressed Matter Implant (with injector)"
/obj/item/weapon/storage/syndie_kit/imp_compress/New()
new /obj/item/weapon/implanter/compressed(src)
..()
return
/obj/item/weapon/storage/syndie_kit/imp_explosive
name = "Explosive Implant (with injector)"
/obj/item/weapon/storage/syndie_kit/imp_explosive/New()
var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(src)
O.imp = new /obj/item/weapon/implant/explosive(O)
O.name = "(BIO-HAZARD) BIO-detpack"
O.update()
..()
return*/
/obj/item/weapon/storage/syndie_kit/imp_uplink
name = "Uplink Implant (with injector)"
/obj/item/weapon/storage/syndie_kit/imp_uplink/New()
var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(src)
O.imp = new /obj/item/weapon/implant/uplink(O)
O.update()
..()
return
/obj/item/weapon/storage/syndie_kit/space
name = "Space Suit and Helmet"
/obj/item/weapon/storage/syndie_kit/space/New()
new /obj/item/clothing/suit/space/syndicate(src)
new /obj/item/clothing/head/helmet/space/syndicate(src)
..()
return
@@ -1,54 +0,0 @@
/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user)
if(istype(src, /obj/item/clothing/gloves/boxing)) //quick fix for stunglove overlay not working nicely with boxing gloves.
user << "<span class='notice'>That won't work.</span>" //i'm not putting my lips on that!
..()
return
if(istype(W, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/C = W
if(!wired)
if(C.amount >= 2)
C.amount -= 2
wired = 1
siemens_coefficient = 1
user << "<span class='notice'>You wrap some wires around [src].</span>"
update_icon()
else
user << "<span class='notice'>There is not enough wire to cover [src].</span>"
else
user << "<span class='notice'>[src] are already wired.</span>"
else if(istype(W, /obj/item/weapon/cell))
if(!wired)
user << "<span class='notice'>[src] need to be wired first.</span>"
else if(!cell)
user.drop_item()
W.loc = src
cell = W
user << "<span class='notice'>You attach a cell to [src].</span>"
update_icon()
else
user << "<span class='notice'>[src] already have a cell.</span>"
else if(istype(W, /obj/item/weapon/wirecutters))
if(cell)
cell.updateicon()
cell.loc = get_turf(src.loc)
cell = null
user << "<span class='notice'>You cut the cell away from [src].</span>"
update_icon()
return
if(wired) //wires disappear into the void because fuck that shit
wired = 0
siemens_coefficient = initial(siemens_coefficient)
user << "<span class='notice'>You cut the wires away from [src].</span>"
update_icon()
..()
return
/obj/item/clothing/gloves/update_icon()
..()
overlays = null
if(wired)
overlays += "gloves_wire"
if(cell)
overlays += "gloves_cell"
@@ -1,17 +1,16 @@
/* Surgery Tools
* Contains:
* Retractor
* Hemostat
* Cautery
* Surgical Drill - MIA!
* Scalpel
* Circular Saw
*/
/*
CONTAINS:
RETRACTOR
HEMOSTAT
CAUTERY
SURGICAL DRILL
SCALPEL
CIRCULAR SAW
*/
/////////////
//RETRACTOR//
/////////////
* Retractor
*/
/obj/item/weapon/retractor/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return
@@ -82,10 +81,9 @@ CIRCULAR SAW
return
////////////
//Hemostat//
////////////
/*
* Hemostat
*/
/obj/item/weapon/hemostat/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return
@@ -168,10 +166,9 @@ CIRCULAR SAW
return
///////////
//Cautery//
///////////
/*
* Cautery
*/
/obj/item/weapon/cautery/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return
@@ -246,13 +243,15 @@ CIRCULAR SAW
return
/*
* Surgical Drill
*/
//obj/item/weapon/surgicaldrill
///////////
//SCALPEL//
///////////
/*
* Scalpel
*/
/obj/item/weapon/scalpel/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return ..()
@@ -452,9 +451,9 @@ CIRCULAR SAW
return
////////////////
//CIRCULAR SAW//
////////////////
/*
* Circular Saw
*/
/obj/item/weapon/circular_saw/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return ..()
@@ -1,19 +1,23 @@
/*
CONTAINS:
BANHAMMER
SWORD
BLADE
AXE
CLASSIC BATON
ENERGY SHIELD (where else should i even put this)
*/
/* Weapons
* Contains:
* Banhammer
* Sword
* Classic Baton
* Energy Blade
* Energy Axe
* Energy Shield
*/
//BANHAMMER
/*
* Banhammer
*/
/obj/item/weapon/banhammer/attack(mob/M as mob, mob/user as mob)
M << "<font color='red'><b> You have been banned FOR NO REISIN by [user]<b></font>"
user << "<font color='red'> You have <b>BANNED</b> [M]</font>"
// SWORD
/*
* Sword
*/
/obj/item/weapon/melee/energy/sword/IsShield()
if(active)
return 1
@@ -51,52 +55,9 @@ ENERGY SHIELD (where else should i even put this)
add_fingerprint(user)
return
/obj/item/weapon/melee/energy/sword/green
New()
color = "green"
/obj/item/weapon/melee/energy/sword/red
New()
color = "red"
// BLADE
//Most of the other special functions are handled in their own files.
/obj/item/weapon/melee/energy/blade/New()
spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
return
/obj/item/weapon/melee/energy/blade/dropped()
del(src)
return
/obj/item/weapon/melee/energy/blade/proc/throw()
del(src)
return
// AXE
/obj/item/weapon/melee/energy/axe/attack(target as mob, mob/user as mob)
..()
/obj/item/weapon/melee/energy/axe/attack_self(mob/user as mob)
src.active = !( src.active )
if (src.active)
user << "\blue The axe is now energised."
src.force = 150
src.icon_state = "axe1"
src.w_class = 5
else
user << "\blue The axe can now be concealed."
src.force = 40
src.icon_state = "axe0"
src.w_class = 5
src.add_fingerprint(user)
return
// CLASSIC BATON
/*
* Classic Baton
*/
/obj/item/weapon/melee/classic_baton
name = "police baton"
desc = "A wooden truncheon for beating criminal scum."
@@ -141,7 +102,58 @@ ENERGY SHIELD (where else should i even put this)
for(var/mob/O in viewers(M))
if (O.client) O.show_message("\red <B>[M] has been stunned with the police baton by [user]!</B>", 1, "\red You hear someone fall", 2)
//ENERGY SHIELD
/*
*Energy Blade
*/
//Most of the other special functions are handled in their own files.
/obj/item/weapon/melee/energy/sword/green
New()
color = "green"
/obj/item/weapon/melee/energy/sword/red
New()
color = "red"
/obj/item/weapon/melee/energy/blade/New()
spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
return
/obj/item/weapon/melee/energy/blade/dropped()
del(src)
return
/obj/item/weapon/melee/energy/blade/proc/throw()
del(src)
return
/*
* Energy Axe
*/
/obj/item/weapon/melee/energy/axe/attack(target as mob, mob/user as mob)
..()
/obj/item/weapon/melee/energy/axe/attack_self(mob/user as mob)
src.active = !( src.active )
if (src.active)
user << "\blue The axe is now energised."
src.force = 150
src.icon_state = "axe1"
src.w_class = 5
else
user << "\blue The axe can now be concealed."
src.force = 40
src.icon_state = "axe0"
src.w_class = 5
src.add_fingerprint(user)
return
/*
* Energy Shield
*/
/obj/item/weapon/shield/energy/IsShield()
if(active)
return 1
@@ -1,15 +1,16 @@
/* Table parts and rack parts
* Contains:
* Table Parts
* Reinforced Table Parts
* Wooden Table Parts
* Rack Parts
*/
/*
CONTAINS:
TABLE PARTS
REINFORCED TABLE PARTS
WOODEN TABLE PARTS
RACK PARTS
*/
// TABLE PARTS
* Table Parts
*/
/obj/item/weapon/table_parts/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/wrench))
@@ -31,20 +32,10 @@ RACK PARTS
del(src)
return
// WOODEN TABLE PARTS
/obj/item/weapon/table_parts/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/wood( src.loc )
del(src)
/obj/item/weapon/table_parts/wood/attack_self(mob/user as mob)
new /obj/structure/table/woodentable( user.loc )
user.drop_item()
del(src)
return
// REINFORCED TABLE PARTS
/*
* Reinforced Table Parts
*/
/obj/item/weapon/table_parts/reinforced/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( src.loc )
@@ -57,11 +48,23 @@ RACK PARTS
del(src)
return
/*
* Wooden Table Parts
*/
/obj/item/weapon/table_parts/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/wood( src.loc )
del(src)
/obj/item/weapon/table_parts/wood/attack_self(mob/user as mob)
new /obj/structure/table/woodentable( user.loc )
user.drop_item()
del(src)
return
// RACK PARTS
/*
* Rack Parts
*/
/obj/item/weapon/rack_parts/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/wrench))
@@ -0,0 +1,117 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/item/weapon/tank/jetpack
name = "Jetpack (Empty)"
desc = "A tank of compressed gas for use as propulsion in zero-gravity areas. Use with caution."
icon_state = "jetpack"
w_class = 4.0
item_state = "jetpack"
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
var/datum/effect/effect/system/ion_trail_follow/ion_trail
var/on = 0.0
var/stabilization_on = 0
var/volume_rate = 500 //Needed for borg jetpack transfer
icon_action_button = "action_jetpack"
New()
..()
src.ion_trail = new /datum/effect/effect/system/ion_trail_follow()
src.ion_trail.set_up(src)
return
examine()
set src in usr
..()
if(air_contents.oxygen < 10)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
playsound(usr, 'sound/effects/alert.ogg', 50, 1)
return
verb/toggle_rockets()
set name = "Toggle Jetpack Stabilization"
set category = "Object"
src.stabilization_on = !( src.stabilization_on )
usr << "You toggle the stabilization [stabilization_on? "on":"off"]."
return
verb/toggle()
set name = "Toggle Jetpack"
set category = "Object"
on = !on
if(on)
icon_state = "[icon_state]-on"
// item_state = "[item_state]-on"
ion_trail.start()
else
icon_state = initial(icon_state)
// item_state = initial(item_state)
ion_trail.stop()
return
proc/allow_thrust(num, mob/living/user as mob)
if(!(src.on))
return 0
if((num < 0.005 || src.air_contents.total_moles() < num))
src.ion_trail.stop()
return 0
var/datum/gas_mixture/G = src.air_contents.remove(num)
var/allgases = G.carbon_dioxide + G.nitrogen + G.oxygen + G.toxins //fuck trace gases -Pete
if(allgases >= 0.005)
return 1
del(G)
return
ui_action_click()
toggle()
/obj/item/weapon/tank/jetpack/void
name = "Void Jetpack (Oxygen)"
desc = "It works well in a void."
icon_state = "jetpack-void"
item_state = "jetpack-void"
New()
..()
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/weapon/tank/jetpack/oxygen
name = "Jetpack (Oxygen)"
desc = "A tank of compressed oxygen for use as propulsion in zero-gravity areas. Use with caution."
icon_state = "jetpack"
item_state = "jetpack"
New()
..()
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/weapon/tank/jetpack/carbondioxide
name = "Jetpack (Carbon Dioxide)"
desc = "A tank of compressed carbon dioxide for use as propulsion in zero-gravity areas. Painted black to indicate that it should not be used as a source for internals."
distribute_pressure = 0
icon_state = "jetpack-black"
item_state = "jetpack-black"
New()
..()
src.ion_trail = new /datum/effect/effect/system/ion_trail_follow()
src.ion_trail.set_up(src)
src.air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
examine()
set src in usr
..()
if(air_contents.carbon_dioxide < 10)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
playsound(usr, 'sound/effects/alert.ogg', 50, 1)
return
@@ -0,0 +1,190 @@
/* Types of tanks!
* Contains:
* Oxygen
* Anesthetic
* Air
* Plasma
* Emergency Oxygen
*/
/*
* Oxygen
*/
/obj/item/weapon/tank/oxygen
name = "Gas Tank (Oxygen)"
desc = "A tank of oxygen"
icon_state = "oxygen"
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
New()
..()
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
examine()
set src in usr
..()
if(air_contents.oxygen < 10)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
playsound(usr, 'sound/effects/alert.ogg', 50, 1)
/obj/item/weapon/tank/oxygen/yellow
name = "Gas Tank (Oxygen)"
desc = "A tank of oxygen, this one is yellow."
icon_state = "oxygen_f"
/obj/item/weapon/tank/oxygen/red
name = "Gas Tank (Oxygen)"
desc = "A tank of oxygen, this one is red."
icon_state = "oxygen_fr"
/*
* Anesthetic
*/
/obj/item/weapon/tank/anesthetic
name = "Gas Tank (Sleeping Agent)"
desc = "A N2O/O2 gas mix"
icon_state = "anesthetic"
item_state = "an_tank"
/obj/item/weapon/tank/anesthetic/New()
..()
src.air_contents.oxygen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
var/datum/gas/sleeping_agent/trace_gas = new()
trace_gas.moles = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
src.air_contents.trace_gases += trace_gas
return
/*
* Air
*/
/obj/item/weapon/tank/air
name = "Gas Tank (Air Mix)"
desc = "Mixed anyone?"
icon_state = "oxygen"
examine()
set src in usr
..()
if(air_contents.oxygen < 1 && loc==usr)
usr << "\red <B>The meter on the [src.name] indicates you are almost out of air!</B>"
usr << sound('sound/effects/alert.ogg')
/obj/item/weapon/tank/air/New()
..()
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
src.air_contents.nitrogen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
return
/*
* Plasma
*/
/obj/item/weapon/tank/plasma
name = "Gas Tank (BIOHAZARD)"
desc = "Contains dangerous plasma. Do not inhale."
icon_state = "plasma"
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = null //they have no straps!
/obj/item/weapon/tank/plasma/New()
..()
src.air_contents.toxins = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/weapon/tank/plasma/proc/release()
var/datum/gas_mixture/removed = air_contents.remove(air_contents.total_moles())
loc.assume_air(removed)
/obj/item/weapon/tank/plasma/proc/ignite()
var/fuel_moles = air_contents.toxins + air_contents.oxygen/6
var/strength = 1
var/turf/ground_zero = get_turf(loc)
loc = null
if(air_contents.temperature > (T0C + 400))
strength = fuel_moles/15
explosion(ground_zero, strength, strength*2, strength*3, strength*4)
else if(air_contents.temperature > (T0C + 250))
strength = fuel_moles/20
explosion(ground_zero, 0, strength, strength*2, strength*3)
else if(air_contents.temperature > (T0C + 100))
strength = fuel_moles/25
explosion(ground_zero, 0, 0, strength, strength*3)
else
ground_zero.assume_air(air_contents)
ground_zero.hotspot_expose(1000, 125)
if(src.master)
del(src.master)
del(src)
/obj/item/weapon/tank/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/flamethrower))
var/obj/item/weapon/flamethrower/F = W
if ((!F.status)||(F.ptank)) return
src.master = F
F.ptank = src
user.before_take_item(src)
src.loc = F
return
/*
* Emergency Oxygen
*/
/obj/item/weapon/tank/emergency_oxygen
name = "emergency oxygen tank"
desc = "Used for emergencies. Contains very little oxygen, so try to conserve it until you actually need it."
icon_state = "emergency"
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
w_class = 2.0
force = 4.0
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
volume = 3 //Tiny. Real life equivalents only have 21 breaths of oxygen in them. They're EMERGENCY tanks anyway -errorage (dangercon 2011)
New()
..()
src.air_contents.oxygen = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
examine()
set src in usr
..()
if(air_contents.oxygen < 0.2 && loc==usr)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
usr << sound('sound/effects/alert.ogg')
/obj/item/weapon/tank/emergency_oxygen/engi
icon_state = "emergency_engi"
name = "extended-capacity emergency oxygen tank"
volume = 6
/obj/item/weapon/tank/emergency_oxygen/double
icon_state = "emergency_double"
name = "Double Emergency Oxygen Tank"
volume = 10
@@ -0,0 +1,256 @@
/obj/item/weapon/tank
name = "tank"
icon = 'icons/obj/tank.dmi'
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BACK
pressure_resistance = ONE_ATMOSPHERE*5
force = 5.0
throwforce = 10.0
throw_speed = 1
throw_range = 4
var/datum/gas_mixture/air_contents = null
var/distribute_pressure = ONE_ATMOSPHERE
var/integrity = 3
var/volume = 70
/obj/item/weapon/tank/New()
..()
src.air_contents = new /datum/gas_mixture()
src.air_contents.volume = volume //liters
src.air_contents.temperature = T20C
processing_objects.Add(src)
return
/obj/item/weapon/tank/Del()
if(air_contents)
del(air_contents)
processing_objects.Remove(src)
..()
/obj/item/weapon/tank/examine()
var/obj/icon = src
if (istype(src.loc, /obj/item/assembly))
icon = src.loc
if (!in_range(src, usr))
if (icon == src) usr << "\blue It's \a \icon[icon][src]! If you want any more information you'll need to get closer."
return
var/celsius_temperature = src.air_contents.temperature-T0C
var/descriptive
if (celsius_temperature < 20)
descriptive = "cold"
else if (celsius_temperature < 40)
descriptive = "room temperature"
else if (celsius_temperature < 80)
descriptive = "lukewarm"
else if (celsius_temperature < 100)
descriptive = "warm"
else if (celsius_temperature < 300)
descriptive = "hot"
else
descriptive = "furiously hot"
usr << "\blue \The \icon[icon][src] feels [descriptive]"
return
/obj/item/weapon/tank/blob_act()
if(prob(50))
var/turf/location = src.loc
if (!( istype(location, /turf) ))
del(src)
if(src.air_contents)
location.assume_air(air_contents)
del(src)
/obj/item/weapon/tank/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
var/obj/icon = src
if (istype(src.loc, /obj/item/assembly))
icon = src.loc
if ((istype(W, /obj/item/device/analyzer) || (istype(W, /obj/item/device/pda))) && get_dist(user, src) <= 1)
for (var/mob/O in viewers(user, null))
O << "\red [user] has used [W] on \icon[icon] [src]"
var/pressure = air_contents.return_pressure()
var/total_moles = air_contents.total_moles()
user << "\blue Results of analysis of \icon[icon]"
if (total_moles>0)
var/o2_concentration = air_contents.oxygen/total_moles
var/n2_concentration = air_contents.nitrogen/total_moles
var/co2_concentration = air_contents.carbon_dioxide/total_moles
var/plasma_concentration = air_contents.toxins/total_moles
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
user << "\blue Pressure: [round(pressure,0.1)] kPa"
user << "\blue Nitrogen: [round(n2_concentration*100)]%"
user << "\blue Oxygen: [round(o2_concentration*100)]%"
user << "\blue CO2: [round(co2_concentration*100)]%"
user << "\blue Plasma: [round(plasma_concentration*100)]%"
if(unknown_concentration>0.01)
user << "\red Unknown: [round(unknown_concentration*100)]%"
user << "\blue Temperature: [round(air_contents.temperature-T0C)]&deg;C"
else
user << "\blue Tank is empty!"
src.add_fingerprint(user)
else if (istype(W,/obj/item/latexballon))
var/obj/item/latexballon/LB = W
LB.blow(src)
src.add_fingerprint(user)
return
/obj/item/weapon/tank/attack_self(mob/user as mob)
if (!(src.air_contents))
return
user.machine = src
var/using_internal
if(istype(loc,/mob/living/carbon))
var/mob/living/carbon/location = loc
if(location.internal==src)
using_internal = 1
var/message = {"
<b>Tank</b><BR>
<FONT color='blue'><b>Tank Pressure:</b> [air_contents.return_pressure()]</FONT><BR>
<BR>
<b>Mask Release Pressure:</b> <A href='?src=\ref[src];dist_p=-10'>-</A> <A href='?src=\ref[src];dist_p=-1'>-</A> [distribute_pressure] <A href='?src=\ref[src];dist_p=1'>+</A> <A href='?src=\ref[src];dist_p=10'>+</A><BR>
<b>Mask Release Valve:</b> <A href='?src=\ref[src];stat=1'>[using_internal?("Open"):("Closed")]</A>
"}
user << browse(message, "window=tank;size=600x300")
onclose(user, "tank")
return
/obj/item/weapon/tank/Topic(href, href_list)
..()
if (usr.stat|| usr.restrained())
return
if (src.loc == usr)
usr.machine = src
if (href_list["dist_p"])
var/cp = text2num(href_list["dist_p"])
src.distribute_pressure += cp
src.distribute_pressure = min(max(round(src.distribute_pressure), 0), 3*ONE_ATMOSPHERE)
if (href_list["stat"])
if(istype(loc,/mob/living/carbon))
var/mob/living/carbon/location = loc
if(location.internal == src)
location.internal = null
location.internals.icon_state = "internal0"
usr << "\blue You close the tank release valve."
if (location.internals)
location.internals.icon_state = "internal0"
else
if(location.wear_mask && (location.wear_mask.flags & MASKINTERNALS))
location.internal = src
usr << "\blue You open \the [src] valve."
if (location.internals)
location.internals.icon_state = "internal1"
else
usr << "\blue You need something to connect to \the [src]."
src.add_fingerprint(usr)
/*
* the following is needed for a tank lying on the floor. But currently we restrict players to use not weared tanks as intrals. --rastaf
for(var/mob/M in viewers(1, src.loc))
if ((M.client && M.machine == src))
src.attack_self(M)
*/
src.attack_self(usr)
else
usr << browse(null, "window=tank")
return
return
/obj/item/weapon/tank/remove_air(amount)
return air_contents.remove(amount)
/obj/item/weapon/tank/return_air()
return air_contents
/obj/item/weapon/tank/assume_air(datum/gas_mixture/giver)
air_contents.merge(giver)
check_status()
return 1
/obj/item/weapon/tank/proc/remove_air_volume(volume_to_return)
if(!air_contents)
return null
var/tank_pressure = air_contents.return_pressure()
if(tank_pressure < distribute_pressure)
distribute_pressure = tank_pressure
var/moles_needed = distribute_pressure*volume_to_return/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
return remove_air(moles_needed)
/obj/item/weapon/tank/process()
//Allow for reactions
air_contents.react()
check_status()
/obj/item/weapon/tank/proc/check_status()
//Handle exploding, leaking, and rupturing of the tank
if(!air_contents)
return 0
var/pressure = air_contents.return_pressure()
if(pressure > TANK_FRAGMENT_PRESSURE)
if(!istype(src.loc,/obj/item/device/transfer_valve))
message_admins("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
log_game("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
//world << "\blue[x],[y] tank is exploding: [pressure] kPa"
//Give the gas a chance to build up more pressure through reacting
air_contents.react()
air_contents.react()
air_contents.react()
pressure = air_contents.return_pressure()
var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE
range = min(range, MAX_EXPLOSION_RANGE) // was 8 - - - Changed to a configurable define -- TLE
var/turf/epicenter = get_turf(loc)
//world << "\blue Exploding Pressure: [pressure] kPa, intensity: [range]"
explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5))
del(src)
else if(pressure > TANK_RUPTURE_PRESSURE)
//world << "\blue[x],[y] tank is rupturing: [pressure] kPa, integrity [integrity]"
if(integrity <= 0)
loc.assume_air(air_contents)
playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3)
del(src)
else
integrity--
else if(pressure > TANK_LEAK_PRESSURE)
//world << "\blue[x],[y] tank is leaking: [pressure] kPa, integrity [integrity]"
if(integrity <= 0)
var/datum/gas_mixture/leaked_gas = air_contents.remove_ratio(0.25)
loc.assume_air(leaked_gas)
else
integrity--
else if(integrity < 3)
integrity++
@@ -1,10 +1,12 @@
/* Teleportation devices.
* Contains:
* Locator
* Hand-tele
*/
/*
CONTAINS:
LOCATOR
HAND_TELE
*/
* Locator
*/
/obj/item/weapon/locator/attack_self(mob/user as mob)
user.machine = src
var/dat
@@ -99,8 +101,10 @@ Frequency:
src.attack_self(M)
return
/// HAND TELE
/*
* Hand-tele
*/
/obj/item/weapon/hand_tele/attack_self(mob/user as mob)
var/turf/current_location = get_turf(user)//What turf is the user on?
if(!current_location||current_location.z==2||current_location.z>=7)//If turf was not found or they're on z level 2 or >7 which does not currently exist.
+51 -47
View File
@@ -1,16 +1,18 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/* Tools!
* Note: Multitools are /obj/item/device
*
* Contains:
* Wrench
* Screwdriver
* Wirecutters
* Welding Tool
*/
/*
CONTAINS:
WRENCH
SCREWDRIVER
WELDINGTOOOL
WIRECUTTERS
*/
// WRENCH
* Wrench
*/
/obj/item/weapon/wrench
name = "wrench"
desc = "A wrench with common uses. Can be found in your hand."
@@ -26,7 +28,9 @@ WIRECUTTERS
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
// SCREWDRIVER
/*
* Screwdriver
*/
/obj/item/weapon/screwdriver/New()
switch(pick("red","blue","purple","brown","green","cyan","yellow"))
if ("red")
@@ -63,9 +67,43 @@ WIRECUTTERS
M = user
return eyestab(M,user)
/*
* Wirecutters
*/
/obj/item/weapon/wirecutters
name = "wirecutters"
desc = "This cuts wires."
icon = 'icons/obj/items.dmi'
icon_state = "cutters"
flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BELT
force = 6.0
throw_speed = 2
throw_range = 9
w_class = 2.0
m_amt = 80
origin_tech = "materials=1;engineering=1"
attack_verb = list("pinched", "nipped")
/obj/item/weapon/wirecutters/New()
if(prob(50))
icon_state = "cutters-y"
item_state = "cutters_yellow"
// WELDING TOOL
/obj/item/weapon/wirecutters/attack(mob/M as mob, mob/user as mob)
if((M.handcuffed) && (istype(M:handcuffed, /obj/item/weapon/handcuffs/cable)))
usr.visible_message("\The [usr] cuts \the [M]'s restraints with \the [src]!",\
"You cut \the [M]'s restraints with \the [src]!",\
"You hear cable being cut.")
M.handcuffed = null
M.update_inv_handcuffed()
return
else
..()
/*
* Welding Tool
*/
/obj/item/weapon/weldingtool
name = "welding tool"
icon = 'icons/obj/items.dmi'
@@ -355,38 +393,4 @@ WIRECUTTERS
var/gen_amount = ((world.time-last_gen)/25)
reagents += (gen_amount)
if(reagents > max_fuel)
reagents = max_fuel
//WIRECUTTERS
/obj/item/weapon/wirecutters
name = "wirecutters"
desc = "This cuts wires."
icon = 'icons/obj/items.dmi'
icon_state = "cutters"
flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BELT
force = 6.0
throw_speed = 2
throw_range = 9
w_class = 2.0
m_amt = 80
origin_tech = "materials=1;engineering=1"
attack_verb = list("pinched", "nipped")
/obj/item/weapon/wirecutters/New()
if(prob(50))
icon_state = "cutters-y"
item_state = "cutters_yellow"
/obj/item/weapon/wirecutters/attack(mob/M as mob, mob/user as mob)
if((M.handcuffed) && (istype(M:handcuffed, /obj/item/weapon/handcuffs/cable)))
usr.visible_message("\The [usr] cuts \the [M]'s restraints with \the [src]!",\
"You cut \the [M]'s restraints with \the [src]!",\
"You hear cable being cut.")
M.handcuffed = null
M.update_inv_handcuffed()
return
else
..()
reagents = max_fuel
@@ -0,0 +1,75 @@
/obj/item/weapon/trashbag
icon = 'icons/obj/trash.dmi'
icon_state = "trashbag0"
item_state = "trashbag"
name = "Trash bag"
desc = "A heavy-duty, no fun allowed trash bag."
var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
var/capacity = 25; //the number of trash it can carry.
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 2.0
/obj/item/weapon/trashbag/update_icon()
if(contents.len == 0)
icon_state = "trashbag0"
else if(contents.len < 12)
icon_state = "trashbag1"
else if(contents.len < 25)
icon_state = "trashbag2"
else icon_state = "trashbag3"
/obj/item/weapon/trashbag/attackby(obj/item/W as obj, mob/living/user as mob)
..()
if (contents.len < capacity)
if (istype(W, /obj/item))
if (W.w_class <= 2)
var/obj/item/O = W
src.contents += O
else
user << "\blue The bag is full!"
/obj/item/weapon/trashbag/attack_self(mob/living/user as mob)
if(contents.len > 0)
for(var/obj/item/I in src.contents)
I.loc = user.loc
update_icon()
user << "\blue You drop all the trash onto the floor."
/obj/item/weapon/trashbag/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
if(istype(target, /obj/item))
var/obj/item/W = target
if(W.w_class <= 2)
if(mode == 1)
if(contents.len < capacity) //slightly redundant, but it makes it prettier in the chatbox. -Pete
user << "\blue You pick up all the trash."
for(var/obj/item/O in get_turf(W))
if(istype(O, /obj/item/weapon/disk/nuclear)) continue //No nuke disks - Nodrak
if(contents.len < capacity)
if(O.w_class <= 2)
contents += O;
else
user << "\blue The bag is full!"
break
else
user << "\blue The bag is full!"
else
if(istype(W, /obj/item/weapon/disk/nuclear)) return //No nuke disks - Nodrak
if(contents.len < capacity)
contents += W;
else
user << "\blue The bag is full!"
update_icon()
return
/obj/item/weapon/trashbag/verb/toggle_mode()
set name = "Switch Bag Method"
set category = "Object"
mode = !mode
switch (mode)
if(1)
usr << "The bag now picks up all trash in a tile at once."
else
usr << "The bag now picks up one piece of trash at a time."
+63 -2
View File
@@ -1,3 +1,10 @@
/* Two-handed Weapons
* Contains:
* Twohanded
* Fireaxe
* Double-Bladed Energy Swords
*/
/*##################################################################
##################### TWO HANDED WEAPONS BE HERE~ -Agouri :3 ########
####################################################################*/
@@ -6,10 +13,15 @@
//This rewrite means we don't have two variables for EVERY item which are used only by a few weapons.
//It also tidies stuff up elsewhere.
/*
* Twohanded
*/
/obj/item/weapon/twohanded
var/wielded = 0
var/force_unwielded = 0
var/force_wielded = 0
var/wieldsound = null
var/unwieldsound = null
/obj/item/weapon/twohanded/proc/unwield()
wielded = 0
@@ -54,6 +66,8 @@
if(wielded) //Trying to unwield it
unwield()
user << "<span class='notice'>You are now carrying the [name] with one hand.</span>"
if (src.unwieldsound)
playsound(src.loc, unwieldsound, 50, 1)
var/obj/item/weapon/twohanded/offhand/O = user.get_inactive_hand()
if(O && istype(O))
@@ -66,6 +80,8 @@
return
wield()
user << "<span class='notice'>You grab the [initial(name)] with both hands.</span>"
if (src.wieldsound)
playsound(src.loc, wieldsound, 50, 1)
var/obj/item/weapon/twohanded/offhand/O = new(user) ////Let's reserve his other hand~
O.name = "[initial(name)] - offhand"
@@ -85,7 +101,9 @@
wield()
del(src)
////////////FIREAXE!//////////////
/*
* Fireaxe
*/
/obj/item/weapon/twohanded/fireaxe // DEM AXES MAN, marker -Agouri
icon_state = "fireaxe0"
name = "fire axe"
@@ -113,4 +131,47 @@
if (W.dir == SOUTHWEST)
new /obj/item/weapon/shard( W.loc )
if(W.reinf) new /obj/item/stack/rods( W.loc)
del(A)
del(A)
/*
* Double-Bladed Energy Swords - Cheridan
*/
/obj/item/weapon/twohanded/dualsaber
icon_state = "dualsaber0"
name = "double-bladed energy sword"
desc = "Handle with care."
force = 3
throwforce = 5.0
throw_speed = 1
throw_range = 5
w_class = 2.0
force_unwielded = 3
force_wielded = 30
wieldsound = 'sound/weapons/saberon.ogg'
unwieldsound = 'sound/weapons/saberoff.ogg'
flags = FPRINT | TABLEPASS | NOSHIELD
origin_tech = "magnets=3;syndicate=4"
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/weapon/twohanded/dualsaber/update_icon()
icon_state = "dualsaber[wielded]"
return
/obj/item/weapon/twohanded/dualsaber/attack(target as mob, mob/living/user as mob)
..()
if((CLUMSY in user.mutations) && (wielded) &&prob(40))
user << "\red You twirl around a bit before losing your balance and impaling yourself on the [src]."
user.take_organ_damage(20,25)
return
if((wielded) && prob(50))
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2))
user.dir = i
sleep(1)
/obj/item/weapon/twohanded/dualsaber/IsShield()
if(wielded)
return 1
else
return 0
+20
View File
@@ -0,0 +1,20 @@
// WIRES
/obj/item/weapon/wire/proc/update()
if (src.amount > 1)
src.icon_state = "spool_wire"
src.desc = text("This is just spool of regular insulated wire. It consists of about [] unit\s of wire.", src.amount)
else
src.icon_state = "item_wire"
src.desc = "This is just a simple piece of regular insulated wire."
return
/obj/item/weapon/wire/attack_self(mob/user as mob)
if (src.laying)
src.laying = 0
user << "\blue You're done laying wire!"
else
user << "\blue You are not using this to lay wire..."
return