Merge branch 'materials' of https://github.com/Zuhayr/Baystation12 into dev

This commit is contained in:
Zuhayr
2015-05-16 23:35:05 +09:30
78 changed files with 1097 additions and 1082 deletions

View File

@@ -91,7 +91,7 @@
/obj/item/weapon/cane/concealed/New()
..()
var/obj/item/weapon/butterfly/switchblade/temp_blade = new(src)
var/obj/item/weapon/material/butterfly/switchblade/temp_blade = new(src)
concealed_blade = temp_blade
temp_blade.attack_self()
@@ -109,7 +109,7 @@
else
..()
/obj/item/weapon/cane/concealed/attackby(var/obj/item/weapon/butterfly/W, var/mob/user)
/obj/item/weapon/cane/concealed/attackby(var/obj/item/weapon/material/butterfly/W, var/mob/user)
if(!src.concealed_blade && istype(W))
user.visible_message("<span class='warning'>[user] has sheathed \a [W] into \his [src]!</span>", "You sheathe \the [W] into \the [src].")
user.drop_from_inventory(W)

View File

@@ -81,12 +81,12 @@
name = "wrench"
path = /obj/item/weapon/wrench
category = "Tools"
/datum/autolathe/recipe/hatchet
name = "hatchet"
path = /obj/item/weapon/hatchet
category = "Tools"
/datum/autolathe/recipe/minihoe
name = "mini hoe"
path = /obj/item/weapon/minihoe
@@ -133,7 +133,7 @@
/datum/autolathe/recipe/knife
name = "kitchen knife"
path = /obj/item/weapon/kitchenknife
path = /obj/item/weapon/material/knife
category = "General"
/datum/autolathe/recipe/taperecorder

View File

@@ -125,7 +125,7 @@
C.loc = src.loc
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
A.state = 3
A.icon_state = "3"
else

View File

@@ -58,7 +58,7 @@
if(stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc )
new /obj/item/weapon/shard( loc )
new /obj/item/weapon/material/shard( loc )
//generate appropriate circuitboard. Accounts for /pod/old computer types
var/obj/item/weapon/circuitboard/pod/M = null

View File

@@ -38,7 +38,7 @@ var/prison_shuttle_timeleft = 0
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
A.state = 3
A.icon_state = "3"
else

View File

@@ -805,18 +805,18 @@ About the new airlock wires panel:
else
spawn(0) close(1)
else if(istype(C, /obj/item/weapon/twohanded/fireaxe) && !arePowerSystemsOn())
else if(istype(C, /obj/item/weapon/material/twohanded/fireaxe) && !arePowerSystemsOn())
if(locked)
user << "\blue The airlock's bolts prevent it from being forced."
else if( !welded && !operating )
if(density)
var/obj/item/weapon/twohanded/fireaxe/F = C
var/obj/item/weapon/material/twohanded/fireaxe/F = C
if(F.wielded)
spawn(0) open(1)
else
user << "\red You need to be wielding \the [C] to do that."
else
var/obj/item/weapon/twohanded/fireaxe/F = C
var/obj/item/weapon/material/twohanded/fireaxe/F = C
if(F.wielded)
spawn(0) close(1)
else

View File

@@ -90,7 +90,7 @@
// This only works on broken doors or doors without power. Also allows repair with Plasteel.
/obj/machinery/door/blast/attackby(obj/item/weapon/C as obj, mob/user as mob)
src.add_fingerprint(user)
if(istype(C, /obj/item/weapon/crowbar) || (istype(C, /obj/item/weapon/twohanded/fireaxe) && C:wielded == 1))
if(istype(C, /obj/item/weapon/crowbar) || (istype(C, /obj/item/weapon/material/twohanded/fireaxe) && C:wielded == 1))
if(((stat & NOPOWER) || (stat & BROKEN)) && !( src.operating ))
force_toggle()
else

View File

@@ -238,7 +238,7 @@
user << "<span class='danger'>\The [src] is welded shut!</span>"
return
if(istype(C, /obj/item/weapon/crowbar) || istype(C,/obj/item/weapon/twohanded/fireaxe))
if(istype(C, /obj/item/weapon/crowbar) || istype(C,/obj/item/weapon/material/twohanded/fireaxe))
if(operating)
return
@@ -248,8 +248,8 @@
"You hear someone struggle and metal straining.")
return
if(istype(C,/obj/item/weapon/twohanded/fireaxe))
var/obj/item/weapon/twohanded/fireaxe/F = C
if(istype(C,/obj/item/weapon/material/twohanded/fireaxe))
var/obj/item/weapon/material/twohanded/fireaxe/F = C
if(!F.wielded)
return

View File

@@ -25,7 +25,7 @@
return
/obj/machinery/door/window/proc/shatter(var/display_message = 1)
new /obj/item/weapon/shard(src.loc)
new /obj/item/weapon/material/shard(src.loc)
var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src.loc)
CC.amount = 2
var/obj/item/weapon/airlock_electronics/ae

View File

@@ -192,7 +192,7 @@
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
var/obj/item/weapon/circuitboard/comm_server/M = new /obj/item/weapon/circuitboard/comm_server( A )
for (var/obj/C in src)
C.loc = src.loc

View File

@@ -130,7 +130,7 @@
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
var/obj/item/weapon/circuitboard/comm_monitor/M = new /obj/item/weapon/circuitboard/comm_monitor( A )
for (var/obj/C in src)
C.loc = src.loc

View File

@@ -213,7 +213,7 @@
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
var/obj/item/weapon/circuitboard/comm_traffic/M = new /obj/item/weapon/circuitboard/comm_traffic( A )
for (var/obj/C in src)
C.loc = src.loc

View File

@@ -910,8 +910,8 @@
desc = "A kitchen and restaurant equipment vendor."
product_ads = "Mm, food stuffs!;Food and food accessories.;Get your plates!;You like forks?;I like forks.;Woo, utensils.;You don't really need these..."
icon_state = "dinnerware"
products = list(/obj/item/weapon/tray = 8,/obj/item/weapon/kitchen/utensil/fork = 6,/obj/item/weapon/kitchenknife = 3,/obj/item/weapon/reagent_containers/food/drinks/drinkingglass = 8,/obj/item/clothing/suit/chef/classic = 2)
contraband = list(/obj/item/weapon/kitchen/utensil/spoon = 2,/obj/item/weapon/kitchen/utensil/knife = 2,/obj/item/weapon/kitchen/rollingpin = 2, /obj/item/weapon/butch = 2)
products = list(/obj/item/weapon/tray = 8,/obj/item/weapon/material/kitchen/utensil/fork = 6,/obj/item/weapon/material/knife = 3,/obj/item/weapon/reagent_containers/food/drinks/drinkingglass = 8,/obj/item/clothing/suit/chef/classic = 2)
contraband = list(/obj/item/weapon/material/kitchen/utensil/spoon = 2,/obj/item/weapon/material/kitchen/utensil/knife = 2,/obj/item/weapon/material/kitchen/rollingpin = 2, /obj/item/weapon/material/knife/butch = 2)
/obj/machinery/vending/sovietsoda
name = "BODA"

View File

@@ -91,9 +91,9 @@
//Step one - dehairing.
/obj/item/stack/sheet/animalhide/attackby(obj/item/weapon/W as obj, mob/user as mob)
if( istype(W, /obj/item/weapon/kitchenknife) || \
istype(W, /obj/item/weapon/kitchen/utensil/knife) || \
istype(W, /obj/item/weapon/twohanded/fireaxe) || \
if( istype(W, /obj/item/weapon/material/knife) || \
istype(W, /obj/item/weapon/material/kitchen/utensil/knife) || \
istype(W, /obj/item/weapon/material/twohanded/fireaxe) || \
istype(W, /obj/item/weapon/hatchet) )
//visible message on mobs is defined as visible_message(var/message, var/self_message, var/blind_message)

View File

@@ -42,9 +42,9 @@ var/global/list/datum/stack_recipe/phoron_recipes = list ( \
var/global/list/datum/stack_recipe/plastic_recipes = list ( \
new/datum/stack_recipe("plastic crate", /obj/structure/closet/crate/plastic, 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("plastic ashtray", /obj/item/ashtray/plastic, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("plastic fork", /obj/item/weapon/kitchen/utensil/pfork, 1, on_floor = 1), \
new/datum/stack_recipe("plastic spoon", /obj/item/weapon/kitchen/utensil/pspoon, 1, on_floor = 1), \
new/datum/stack_recipe("plastic knife", /obj/item/weapon/kitchen/utensil/pknife, 1, on_floor = 1), \
new/datum/stack_recipe("plastic fork", /obj/item/weapon/material/kitchen/utensil/fork/plastic, 1, on_floor = 1), \
new/datum/stack_recipe("plastic spoon", /obj/item/weapon/material/kitchen/utensil/spoon/plastic, 1, on_floor = 1), \
new/datum/stack_recipe("plastic knife", /obj/item/weapon/material/kitchen/utensil/knife/plastic, 1, on_floor = 1), \
new/datum/stack_recipe("plastic bag", /obj/item/weapon/storage/bag/plasticbag, 3, on_floor = 1), \
new/datum/stack_recipe("blood pack", /obj/item/weapon/reagent_containers/blood/empty, 4, on_floor = 0), \
new/datum/stack_recipe("reagent dispenser cartridge (large)", /obj/item/weapon/reagent_containers/chem_disp_cartridge, 5, on_floor=0), // 500u

View File

@@ -33,7 +33,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
null, \
new/datum/stack_recipe("table frame", /obj/structure/table, 1, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("rack", /obj/structure/table/rack, 1, time = 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("metal baseball bat", /obj/item/weapon/twohanded/baseballbat/metal, 10, time = 20, one_per_turf = 0, on_floor = 1), \
new/datum/stack_recipe("metal baseball bat", /obj/item/weapon/material/twohanded/baseballbat/metal, 10, time = 20, one_per_turf = 0, on_floor = 1), \
new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1), \
@@ -152,7 +152,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
new/datum/stack_recipe("crossbow frame", /obj/item/weapon/crossbowframe, 5, time = 25, one_per_turf = 0, on_floor = 0), \
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("baseball bat", /obj/item/weapon/twohanded/baseballbat, 10, time = 20, one_per_turf = 0, on_floor = 1) \
new/datum/stack_recipe("baseball bat", /obj/item/weapon/material/twohanded/baseballbat, 10, time = 20, one_per_turf = 0, on_floor = 1) \
// new/datum/stack_recipe("apiary", /obj/item/apiary, 10, time = 25, one_per_turf = 0, on_floor = 0)
)

View File

@@ -0,0 +1,68 @@
/obj/item/butterflyconstruction
name = "unfinished concealed knife"
desc = "An unfinished concealed knife, it looks like the screws need to be tightened."
icon = 'icons/obj/buildingobject.dmi'
icon_state = "butterflystep1"
/obj/item/butterflyconstruction/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/screwdriver))
user << "You finish the concealed blade weapon."
new /obj/item/weapon/material/butterfly(user.loc)
qdel(src)
return
/obj/item/butterflyblade
name = "knife blade"
desc = "A knife blade. Unusable as a weapon without a grip."
icon = 'icons/obj/buildingobject.dmi'
icon_state = "butterfly2"
matter = list(DEFAULT_WALL_MATERIAL = 5000)
/obj/item/butterflyhandle
name = "concealed knife grip"
desc = "A plasteel grip with screw fittings for a blade."
icon = 'icons/obj/buildingobject.dmi'
icon_state = "butterfly1"
matter = list(DEFAULT_WALL_MATERIAL = 4000)
/obj/item/butterflyhandle/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/butterflyblade))
user << "You attach the two concealed blade parts."
new /obj/item/butterflyconstruction(user.loc)
qdel(W)
qdel(src)
return
update_icon(user)
/obj/item/weapon/wirerod
name = "wired rod"
desc = "A rod with some wire wrapped around the top. It'd be easy to attach something to the top bit."
icon_state = "wiredrod"
item_state = "rods"
flags = CONDUCT
force = 8
throwforce = 10
w_class = 3
attack_verb = list("hit", "bludgeoned", "whacked", "bonked")
/obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob)
..()
if(istype(I, /obj/item/weapon/material/shard))
var/obj/item/weapon/material/twohanded/spear/S = new /obj/item/weapon/material/twohanded/spear
user.put_in_hands(S)
user << "<span class='notice'>You fasten the glass shard to the top of the rod with the cable.</span>"
qdel(I)
qdel(src)
update_icon(user)
else if(istype(I, /obj/item/weapon/wirecutters))
var/obj/item/weapon/melee/baton/cattleprod/P = new /obj/item/weapon/melee/baton/cattleprod
user.put_in_hands(P)
user << "<span class='notice'>You fasten the wirecutters to the top of the rod with the cable, prongs outward.</span>"
qdel(I)
qdel(src)
update_icon(user)
update_icon(user)

View File

@@ -1,468 +0,0 @@
/* Kitchen tools
* Contains:
* Utensils
* Spoons
* Forks
* Knives
* Kitchen knives
* Butcher's cleaver
* Rolling Pins
* Trays
*/
/obj/item/weapon/kitchen
icon = 'icons/obj/kitchen.dmi'
/*
* Utensils
*/
/obj/item/weapon/kitchen/utensil
force = 5.0
w_class = 1.0
throwforce = 5.0
throw_speed = 3
throw_range = 5
flags = CONDUCT
origin_tech = "materials=1"
attack_verb = list("attacked", "stabbed", "poked")
sharp = 0
var/loaded //Descriptive string for currently loaded food object.
/obj/item/weapon/kitchen/utensil/New()
if (prob(60))
src.pixel_y = rand(0, 4)
create_reagents(5)
return
/obj/item/weapon/kitchen/utensil/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return ..()
if(user.a_intent != I_HELP)
if(user.zone_sel.selecting == "head" || user.zone_sel.selecting == "eyes")
if((CLUMSY in user.mutations) && prob(50))
M = user
return eyestab(M,user)
else
return ..()
if (reagents.total_volume > 0)
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
if(M == user)
for(var/mob/O in viewers(M, null))
O.show_message(text("\blue [] eats some [] from \the [].", user, loaded, src), 1)
M.reagents.add_reagent("nutriment", 1)
else
for(var/mob/O in viewers(M, null))
O.show_message(text("\blue [] feeds [] some [] from \the []", user, M, loaded, src), 1)
M.reagents.add_reagent("nutriment", 1)
playsound(M.loc,'sound/items/eatfood.ogg', rand(10,40), 1)
overlays.Cut()
return
else
..()
/obj/item/weapon/kitchen/utensil/fork
name = "fork"
desc = "It's a fork. Sure is pointy."
icon_state = "fork"
/obj/item/weapon/kitchen/utensil/pfork
name = "plastic fork"
desc = "Yay, no washing up to do."
icon_state = "pfork"
/obj/item/weapon/kitchen/utensil/spoon
name = "spoon"
desc = "It's a spoon. You can see your own upside-down face in it."
icon_state = "spoon"
attack_verb = list("attacked", "poked")
/obj/item/weapon/kitchen/utensil/pspoon
name = "plastic spoon"
desc = "It's a plastic spoon. How dull."
icon_state = "pspoon"
attack_verb = list("attacked", "poked")
/*
* Knives
*/
/obj/item/weapon/kitchen/utensil/knife
name = "knife"
desc = "Can cut through any food."
icon_state = "knife"
force = 10.0
throwforce = 10.0
sharp = 1
edge = 1
suicide_act(mob/user)
viewers(user) << pick("\red <b>[user] is slitting \his wrists with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his throat with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</b>")
return (BRUTELOSS)
/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
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/obj/item/weapon/kitchen/utensil/pknife
name = "plastic knife"
desc = "The bluntest of blades."
icon_state = "pknife"
force = 1
throwforce = 1
sharp = 0
edge = 1 //for cutting pizzas
/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 somehow managed to cut yourself with the [src]."
user.take_organ_damage(20)
return
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/*
* Kitchen knives
*/
/obj/item/weapon/kitchenknife
name = "kitchen knife"
icon = 'icons/obj/kitchen.dmi'
icon_state = "knife"
desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
flags = CONDUCT
sharp = 1
edge = 1
force = 10.0
w_class = 3.0
throwforce = 6.0
throw_speed = 3
throw_range = 6
matter = list(DEFAULT_WALL_MATERIAL = 12000)
origin_tech = "materials=1"
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
suicide_act(mob/user)
viewers(user) << pick("\red <b>[user] is slitting \his wrists with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his throat with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</b>")
return (BRUTELOSS)
/obj/item/weapon/kitchenknife/hook
name = "meat hook"
desc = "A sharp, metal hook what sticks into things."
icon_state = "hook_knife"
item_state = "hook_knife"
/obj/item/weapon/kitchenknife/ritual
name = "ritual knife"
desc = "The unearthly energies that once powered this blade are now dormant."
icon = 'icons/obj/wizard.dmi'
icon_state = "render"
/*
* Bucher's cleaver
*/
/obj/item/weapon/butch
name = "butcher's cleaver"
icon = 'icons/obj/kitchen.dmi'
icon_state = "butch"
desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown-by-products."
flags = CONDUCT
force = 15.0
w_class = 2.0
throwforce = 8.0
throw_speed = 3
throw_range = 6
matter = list(DEFAULT_WALL_MATERIAL = 12000)
origin_tech = "materials=1"
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
sharp = 1
edge = 1
/obj/item/weapon/butch/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/*
* Rolling Pins
*/
/obj/item/weapon/kitchen/rollingpin
name = "rolling pin"
desc = "Used to knock out the Bartender."
icon_state = "rolling_pin"
force = 8.0
throwforce = 10.0
throw_speed = 2
throw_range = 7
w_class = 3.0
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") //I think the rollingpin attackby will end up ignoring this anyway.
/obj/item/weapon/kitchen/rollingpin/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>")
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
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
user.visible_message("\red <B>[H] has been knocked unconscious!</B>", "\red <B>You knock [H] unconscious!</B>")
return
else
H.visible_message("\red [user] tried to knock [H] unconscious!", "\red [user] tried to knock you unconscious!")
H.eye_blurry += 3
return ..()
/*
* Trays - Agouri
*/
/obj/item/weapon/tray
name = "tray"
icon = 'icons/obj/food.dmi'
icon_state = "tray"
desc = "A metal tray to lay food on."
throwforce = 12.0
throwforce = 10.0
throw_speed = 1
throw_range = 5
w_class = 3.0
flags = CONDUCT
matter = list(DEFAULT_WALL_MATERIAL = 3000)
/* // NOPE
var/food_total= 0
var/burger_amt = 0
var/cheese_amt = 0
var/fries_amt = 0
var/classyalcdrink_amt = 0
var/alcdrink_amt = 0
var/bottle_amt = 0
var/soda_amt = 0
var/carton_amt = 0
var/pie_amt = 0
var/meatbreadslice_amt = 0
var/salad_amt = 0
var/miscfood_amt = 0
*/
var/list/carrying = list() // List of things on the tray. - Doohl
var/max_carry = 10 // w_class = 1 -- takes up 1
// w_class = 2 -- takes up 3
// w_class = 3 -- takes up 5
/obj/item/weapon/tray/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
// Drop all the things. All of them.
overlays.Cut()
for(var/obj/item/I in carrying)
I.loc = M.loc
carrying.Remove(I)
if(isturf(I.loc))
spawn()
for(var/i = 1, i <= rand(1,2), i++)
if(I)
step(I, pick(NORTH,SOUTH,EAST,WEST))
sleep(rand(2,4))
if((CLUMSY in user.mutations) && prob(50)) //What if he's a clown?
M << "\red You accidentally slam yourself with the [src]!"
M.Weaken(1)
user.take_organ_damage(2)
if(prob(50))
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
return
else
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin'
return //it always returns, but I feel like adding an extra return just for safety's sakes. EDIT; Oh well I won't :3
var/mob/living/carbon/human/H = M ///////////////////////////////////// /Let's have this ready for later.
if(!(user.zone_sel.selecting == ("eyes" || "head"))) //////////////hitting anything else other than the eyes
if(prob(33))
src.add_blood(H)
var/turf/location = H.loc
if (istype(location, /turf/simulated))
location.add_blood(H) ///Plik plik, the sound of blood
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>")
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
if(prob(15))
M.Weaken(3)
M.take_organ_damage(3)
else
M.take_organ_damage(5)
if(prob(50))
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
return
else
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //we applied the damage, we played the sound, we showed the appropriate messages. Time to return and stop the proc
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
return
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES)))
M << "\red You get slammed in the face with the tray, against your mask!"
if(prob(33))
src.add_blood(H)
if (H.wear_mask)
H.wear_mask.add_blood(H)
if (H.head)
H.head.add_blood(H)
if (H.glasses && prob(33))
H.glasses.add_blood(H)
var/turf/location = H.loc
if (istype(location, /turf/simulated)) //Addin' blood! At least on the floor and item :v
location.add_blood(H)
if(prob(50))
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
else
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin'
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
if(prob(10))
M.Stun(rand(1,3))
M.take_organ_damage(3)
return
else
M.take_organ_damage(5)
return
else //No eye or head protection, tough luck!
M << "\red You get slammed in the face with the tray!"
if(prob(33))
src.add_blood(M)
var/turf/location = H.loc
if (istype(location, /turf/simulated))
location.add_blood(H)
if(prob(50))
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] in the face with the tray!</B>", user, M), 1)
else
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin' again
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] in the face with the tray!</B>", user, M), 1)
if(prob(30))
M.Stun(rand(2,4))
M.take_organ_damage(4)
return
else
M.take_organ_damage(8)
if(prob(30))
M.Weaken(2)
return
return
/obj/item/weapon/tray/var/cooldown = 0 //shield bash cooldown. based on world.time
/obj/item/weapon/tray/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/kitchen/rollingpin))
if(cooldown < world.time - 25)
user.visible_message("<span class='warning'>[user] bashes [src] with [W]!</span>")
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
cooldown = world.time
else
..()
/*
===============~~~~~================================~~~~~====================
= =
= Code for trays carrying things. By Doohl for Doohl erryday Doohl Doohl~ =
= =
===============~~~~~================================~~~~~====================
*/
/obj/item/weapon/tray/proc/calc_carry()
// calculate the weight of the items on the tray
var/val = 0 // value to return
for(var/obj/item/I in carrying)
if(I.w_class == 1.0)
val ++
else if(I.w_class == 2.0)
val += 3
else
val += 5
return val
/obj/item/weapon/tray/pickup(mob/user)
if(!isturf(loc))
return
for(var/obj/item/I in loc)
if( I != src && !I.anchored && !istype(I, /obj/item/clothing/under) && !istype(I, /obj/item/clothing/suit) && !istype(I, /obj/item/projectile) )
var/add = 0
if(I.w_class == 1.0)
add = 1
else if(I.w_class == 2.0)
add = 3
else
add = 5
if(calc_carry() + add >= max_carry)
break
I.loc = src
carrying.Add(I)
overlays += image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = 30 + I.layer)
/obj/item/weapon/tray/dropped(mob/user)
var/mob/living/M
for(M in src.loc) //to handle hand switching
return
var/foundtable = 0
for(var/obj/structure/table/T in loc)
foundtable = 1
break
overlays.Cut()
for(var/obj/item/I in carrying)
I.loc = loc
carrying.Remove(I)
if(!foundtable && isturf(loc))
// if no table, presume that the person just shittily dropped the tray on the ground and made a mess everywhere!
spawn()
for(var/i = 1, i <= rand(1,2), i++)
if(I)
step(I, pick(NORTH,SOUTH,EAST,WEST))
sleep(rand(2,4))

View File

@@ -0,0 +1,34 @@
/obj/item/weapon/material/twohanded/baseballbat
name = "bat"
desc = "HOME RUN!"
icon_state = "metalbat0"
base_icon = "metalbat"
item_state = "metalbat"
sharp = 0
edge = 0
w_class = 3
force = 10
throw_speed = 3
throw_range = 7
throwforce = 7
attack_verb = list("smashed", "beaten", "slammed", "smacked", "struck", "battered", "bonked")
hitsound = 'sound/weapons/genhit3.ogg'
force_wielded = 20
health = 10
default_material = "wood"
//Predefined materials go here.
/obj/item/weapon/material/twohanded/baseballbat/metal/New(var/newloc)
..(newloc,"steel")
/obj/item/weapon/material/twohanded/baseballbat/uranium/New(var/newloc)
..(newloc,"uranium")
/obj/item/weapon/material/twohanded/baseballbat/gold/New(var/newloc)
..(newloc,"gold")
/obj/item/weapon/material/twohanded/baseballbat/platinum/New(var/newloc)
..(newloc,"platinum")
/obj/item/weapon/material/twohanded/baseballbat/diamond/New(var/newloc)
..(newloc,"diamond")

View File

@@ -0,0 +1,155 @@
/obj/item/weapon/material/kitchen
icon = 'icons/obj/kitchen.dmi'
/*
* Utensils
*/
/obj/item/weapon/material/kitchen/utensil
force = 5.0
w_class = 1.0
throwforce = 5.0
throw_speed = 3
throw_range = 5
flags = CONDUCT
origin_tech = "materials=1"
attack_verb = list("attacked", "stabbed", "poked")
sharp = 0
var/loaded //Descriptive string for currently loaded food object.
/obj/item/weapon/material/kitchen/utensil/New()
if (prob(60))
src.pixel_y = rand(0, 4)
create_reagents(5)
return
/obj/item/weapon/material/kitchen/utensil/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return ..()
if(user.a_intent != I_HELP)
if(user.zone_sel.selecting == "head" || user.zone_sel.selecting == "eyes")
if((CLUMSY in user.mutations) && prob(50))
M = user
return eyestab(M,user)
else
return ..()
if (reagents.total_volume > 0)
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
if(M == user)
for(var/mob/O in viewers(M, null))
O.show_message(text("\blue [] eats some [] from \the [].", user, loaded, src), 1)
M.reagents.add_reagent("nutriment", 1)
else
for(var/mob/O in viewers(M, null))
O.show_message(text("\blue [] feeds [] some [] from \the []", user, M, loaded, src), 1)
M.reagents.add_reagent("nutriment", 1)
playsound(M.loc,'sound/items/eatfood.ogg', rand(10,40), 1)
overlays.Cut()
return
else
..()
/obj/item/weapon/material/kitchen/utensil/fork
name = "fork"
desc = "It's a fork. Sure is pointy."
icon_state = "fork"
/obj/item/weapon/material/kitchen/utensil/fork/plastic
default_material = "plastic"
/obj/item/weapon/material/kitchen/utensil/spoon
name = "spoon"
desc = "It's a spoon. You can see your own upside-down face in it."
icon_state = "spoon"
attack_verb = list("attacked", "poked")
/obj/item/weapon/material/kitchen/utensil/spoon/plastic
default_material = "plastic"
/*
* Knives
*/
/obj/item/weapon/material/kitchen/utensil/knife
name = "knife"
desc = "Can cut through any food."
icon_state = "knife"
force = 10.0
throwforce = 10.0
sharp = 1
edge = 1
suicide_act(mob/user)
viewers(user) << pick("\red <b>[user] is slitting \his wrists with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his throat with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</b>")
return (BRUTELOSS)
/obj/item/weapon/material/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
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/obj/item/weapon/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red You somehow managed to cut yourself with the [src]."
user.take_organ_damage(20)
return
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/obj/item/weapon/material/kitchen/utensil/knife/plastic
default_material = "plastic"
/*
* Rolling Pins
*/
/obj/item/weapon/material/kitchen/rollingpin
name = "rolling pin"
desc = "Used to knock out the Bartender."
icon_state = "rolling_pin"
force = 8.0
throwforce = 10.0
throw_speed = 2
throw_range = 7
w_class = 3.0
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") //I think the rollingpin attackby will end up ignoring this anyway.
/obj/item/weapon/material/kitchen/rollingpin/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>")
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
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
user.visible_message("\red <B>[H] has been knocked unconscious!</B>", "\red <B>You knock [H] unconscious!</B>")
return
else
H.visible_message("\red [user] tried to knock [H] unconscious!", "\red [user] tried to knock you unconscious!")
H.eye_blurry += 3
return ..()

View File

@@ -0,0 +1,99 @@
/obj/item/weapon/material/butterfly
name = "butterfly knife"
desc = "A basic metal blade concealed in a lightweight plasteel grip. Small enough when folded to fit in a pocket."
icon_state = "butterflyknife"
item_state = null
hitsound = null
var/active = 0
w_class = 2
force = 2
sharp = 0
edge = 0
throw_speed = 3
throw_range = 4
throwforce = 7
attack_verb = list("patted", "tapped")
applies_material_colour = 1
/obj/item/weapon/material/butterfly/update_force()
if(active)
..() //Updates force.
throwforce = max(3,force-3)
edge = 1
sharp = 1
hitsound = initial(hitsound)
icon_state += "_open"
w_class = 3
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
else
force = 3
edge = 0
sharp = 0
hitsound = null
icon_state = initial(icon_state)
w_class = initial(w_class)
attack_verb = initial(attack_verb)
/obj/item/weapon/material/butterfly/switchblade
name = "switchblade"
desc = "A classic switchblade with gold engraving. Just holding it makes you feel like a gangster."
icon_state = "switchblade"
unbreakable = 1
/obj/item/weapon/material/butterfly/attack_self(mob/user)
active = !active
if(active)
user << "<span class='notice'>You flip out your [src].</span>"
playsound(user, 'sound/weapons/flipblade.ogg', 15, 1)
else
user << "<span class='notice'>The butterfly knife can now be concealed.</span>"
update_force()
add_fingerprint(user)
/*
* Kitchen knives
*/
/obj/item/weapon/material/knife
name = "kitchen knife"
icon = 'icons/obj/kitchen.dmi'
icon_state = "knife"
desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
flags = CONDUCT
sharp = 1
edge = 1
force = 10
w_class = 3
throwforce = 8
throw_speed = 3
throw_range = 6
matter = list(DEFAULT_WALL_MATERIAL = 12000)
origin_tech = "materials=1"
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
unbreakable = 1
applies_material_colour = 1
/obj/item/weapon/material/knife/suicide_act(mob/user)
viewers(user) << pick("\red <b>[user] is slitting \his wrists with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his throat with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</b>")
return (BRUTELOSS)
/obj/item/weapon/material/knife/hook
name = "meat hook"
desc = "A sharp, metal hook what sticks into things."
icon_state = "hook_knife"
item_state = "hook_knife"
/obj/item/weapon/material/knife/ritual
name = "ritual knife"
desc = "The unearthly energies that once powered this blade are now dormant."
icon = 'icons/obj/wizard.dmi'
icon_state = "render"
/obj/item/weapon/material/knife/butch
name = "butcher's cleaver"
icon = 'icons/obj/kitchen.dmi'
icon_state = "butch"
desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown-by-products."
force = 15
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")

View File

@@ -0,0 +1,61 @@
/obj/item/weapon/material
health = 10
hitsound = 'sound/weapons/bladeslice.ogg'
gender = NEUTER
var/applies_material_colour
var/unbreakable
var/damage_divisor = 0.5
var/default_material = DEFAULT_WALL_MATERIAL
var/material/material
/obj/item/weapon/material/New(var/newloc, var/material_key)
..(newloc)
if(!material_key)
material_key = default_material
set_material(material_key)
/obj/item/weapon/material/proc/update_force()
force = round(material.get_blunt_damage()*damage_divisor)
/obj/item/weapon/material/proc/set_material(var/new_material)
material = get_material_by_name(new_material)
if(!material)
qdel(src)
else
name = "[material.display_name] bat"
health = round(material.integrity/10)
if(applies_material_colour)
color = material.icon_colour
if(material.products_need_process())
processing_objects |= src
update_force()
/obj/item/weapon/material/Destroy()
processing_objects -= src
..()
/obj/item/weapon/material/attack()
if(!..())
return
if(!unbreakable)
if(!prob(material.hardness))
health--
if(health<=0)
shatter()
/obj/item/weapon/material/proc/shatter()
var/turf/T = get_turf(src)
T.visible_message("<span class='danger'>\The [src] shatters!</span>")
if(istype(loc, /mob/living))
var/mob/living/M = loc
M.drop_from_inventory(src)
playsound(src, "shatter", 70, 1)
new material.shard_type(T)
qdel(src)
/obj/item/weapon/material/process()
if(!material.radioactivity)
return
for(var/mob/living/L in range(1,src))
L.apply_effect(round(material.radioactivity/3),IRRADIATE,0)

View File

@@ -0,0 +1,11 @@
/obj/item/weapon/material/harpoon
name = "harpoon"
sharp = 1
edge = 0
desc = "Tharr she blows!"
icon_state = "harpoon"
item_state = "harpoon"
force = 20
throwforce = 15
w_class = 3
attack_verb = list("jabbed","stabbed","ripped")

View File

@@ -0,0 +1,91 @@
// Glass shards
/obj/item/weapon/material/shard
name = "shard"
icon = 'icons/obj/shards.dmi'
icon_state = "large"
sharp = 1
edge = 1
desc = "Made of nothing. How does this even exist?" // set based on material, if this desc is visible it's a bug (shards default to being made of glass)
w_class = 2
force = 5
throwforce = 8
item_state = "shard-glass"
attack_verb = list("stabbed", "slashed", "sliced", "cut")
default_material = "glass"
unbreakable = 1 //It's already broken.
damage_divisor = 0.1 //So tiny.
/obj/item/weapon/material/shard/suicide_act(mob/user)
viewers(user) << pick("\red <b>[user] is slitting \his wrists with \the [src]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his throat with \the [src]! It looks like \he's trying to commit suicide.</b>")
return (BRUTELOSS)
/obj/item/weapon/material/shard/set_material(var/new_material)
..(new_material)
if(!istype(material))
return
icon_state = "[material.shard_icon][pick("large", "medium", "small")]"
pixel_x = rand(-8, 8)
pixel_y = rand(-8, 8)
update_icon()
if(material.shard_type)
name = "[material.display_name] [material.shard_type]"
desc = "A small piece of [material.display_name]. It looks sharp, you wouldn't want to step on it barefoot. Could probably be used as ... a throwing weapon?"
switch(material.shard_type)
if(SHARD_SPLINTER, SHARD_SHRAPNEL)
gender = PLURAL
else
gender = NEUTER
else
qdel(src)
/obj/item/weapon/material/shard/update_icon()
if(material)
color = material.icon_colour
// 1-(1-x)^2, so that glass shards with 0.3 opacity end up somewhat visible at 0.51 opacity
alpha = 255 * (1 - (1 - material.opacity)*(1 - material.opacity))
else
color = "#ffffff"
alpha = 255
/obj/item/weapon/material/shard/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/weldingtool) && material.shard_can_repair)
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
material.place_sheet(loc)
qdel(src)
return
return ..()
/obj/item/weapon/material/shard/Crossed(AM as mob|obj)
if(ismob(AM))
var/mob/M = AM
M << "\red <B>You step on \the [src]!</B>"
playsound(src.loc, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species.flags & IS_SYNTHETIC || (H.species.siemens_coefficient<0.5)) //Thick skin.
return
if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) )
var/obj/item/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
if(affecting.status & ORGAN_ROBOT)
return
if(affecting.take_damage(5, 0))
H.UpdateDamageIcon()
H.updatehealth()
if(!(H.species && (H.species.flags & NO_PAIN)))
H.Weaken(3)
..()
// Preset types - left here for the code that uses them
/obj/item/weapon/material/shard/shrapnel/New(loc)
..(loc, "steel")
/obj/item/weapon/material/shard/phoron/New(loc)
..(loc, "phoron glass")

View File

@@ -0,0 +1,43 @@
/obj/item/weapon/material/claymore
name = "claymore"
desc = "What are you standing around staring at this for? Get to killing!"
icon_state = "claymore"
item_state = "claymore"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 40
throwforce = 10
sharp = 1
edge = 1
w_class = 3
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
/obj/item/weapon/material/claymore/IsShield()
return 1
/obj/item/weapon/material/claymore/suicide_act(mob/user)
viewers(user) << "<span class='danger'>[user] is falling on the [src.name]! It looks like \he's trying to commit suicide.</span>"
return(BRUTELOSS)
/obj/item/weapon/material/katana
name = "katana"
desc = "Woefully underpowered in D20"
icon_state = "katana"
item_state = "katana"
flags = CONDUCT
slot_flags = SLOT_BELT | SLOT_BACK
force = 40
throwforce = 10
sharp = 1
edge = 1
w_class = 3
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
/obj/item/weapon/material/katana/suicide_act(mob/user)
viewers(user) << "<span class='danger'>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</span>"
return(BRUTELOSS)
/obj/item/weapon/material/katana/IsShield()
return 1

View File

@@ -0,0 +1,25 @@
/obj/item/weapon/material/star
name = "shuriken"
desc = "A sharp, perfectly weighted piece of metal."
icon_state = "star"
force = 5
throw_speed = 10
throwforce = 15
throw_range = 15
sharp = 1
edge = 1
matter = list(DEFAULT_WALL_MATERIAL = 500)
/obj/item/weapon/material/star/New()
..()
src.pixel_x = rand(-12, 12)
src.pixel_y = rand(-12, 12)
/obj/item/weapon/material/star/throw_impact(atom/hit_atom)
..()
if(material.radioactivity>0 && istype(hit_atom,/mob/living))
var/mob/living/M = hit_atom
M.adjustToxLoss(rand(20,40))
/obj/item/weapon/material/star/ninja
default_material = "uranium"

View File

@@ -16,53 +16,60 @@
/*
* Twohanded
*/
/obj/item/weapon/twohanded
/obj/item/weapon/material/twohanded
var/wielded = 0
var/force_wielded = 0
var/force_unwielded
var/wieldsound = null
var/unwieldsound = null
var/base_icon
var/base_name
/obj/item/weapon/twohanded/proc/unwield()
/obj/item/weapon/material/twohanded/proc/unwield()
wielded = 0
force = initial(force)
name = "[initial(name)]"
force = force_unwielded
name = "[base_name]"
update_icon()
/obj/item/weapon/twohanded/proc/wield()
/obj/item/weapon/material/twohanded/proc/wield()
wielded = 1
force = force_wielded
name = "[initial(name)] (Wielded)"
name = "[base_name] (Wielded)"
update_icon()
/obj/item/weapon/twohanded/New()
/obj/item/weapon/material/twohanded/update_force()
base_name = name
force_unwielded = force
force_wielded = material.get_blunt_damage()
/obj/item/weapon/material/twohanded/New()
..()
update_icon()
/obj/item/weapon/twohanded/mob_can_equip(M as mob, slot)
/obj/item/weapon/material/twohanded/mob_can_equip(M as mob, slot)
//Cannot equip wielded items.
if(wielded)
M << "<span class='warning'>Unwield the [initial(name)] first!</span>"
M << "<span class='warning'>Unwield the [base_name] first!</span>"
return 0
return ..()
/obj/item/weapon/twohanded/dropped(mob/user as mob)
/obj/item/weapon/material/twohanded/dropped(mob/user as mob)
//handles unwielding a twohanded weapon when dropped as well as clearing up the offhand
if(user)
var/obj/item/weapon/twohanded/O = user.get_inactive_hand()
var/obj/item/weapon/material/twohanded/O = user.get_inactive_hand()
if(istype(O))
O.unwield()
return unwield()
/obj/item/weapon/twohanded/update_icon()
/obj/item/weapon/material/twohanded/update_icon()
icon_state = "[base_icon][wielded]"
item_state = icon_state
/obj/item/weapon/twohanded/pickup(mob/user)
/obj/item/weapon/material/twohanded/pickup(mob/user)
unwield()
/obj/item/weapon/twohanded/attack_self(mob/user as mob)
/obj/item/weapon/material/twohanded/attack_self(mob/user as mob)
..()
@@ -80,7 +87,7 @@
if (src.unwieldsound)
playsound(src.loc, unwieldsound, 50, 1)
var/obj/item/weapon/twohanded/offhand/O = user.get_inactive_hand()
var/obj/item/weapon/material/twohanded/offhand/O = user.get_inactive_hand()
if(O && istype(O))
O.unwield()
@@ -89,13 +96,13 @@
user << "<span class='warning'>You need your other hand to be empty</span>"
return
wield()
user << "<span class='notice'>You grab the [initial(name)] with both hands.</span>"
user << "<span class='notice'>You grab the [base_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"
O.desc = "Your second grip on the [initial(name)]"
var/obj/item/weapon/material/twohanded/offhand/O = new(user) ////Let's reserve his other hand~
O.name = "[base_name] - offhand"
O.desc = "Your second grip on the [base_name]"
user.put_in_inactive_hand(O)
if(istype(user,/mob/living/carbon/human))
@@ -106,24 +113,25 @@
return
///////////OFFHAND///////////////
/obj/item/weapon/twohanded/offhand
/obj/item/weapon/material/twohanded/offhand
w_class = 5.0
icon_state = "offhand"
name = "offhand"
default_material = "placeholder"
unwield()
qdel(src)
/obj/item/weapon/material/twohanded/offhand/unwield()
qdel(src)
wield()
qdel(src)
/obj/item/weapon/material/twohanded/offhand/wield()
qdel(src)
/obj/item/weapon/twohanded/offhand/update_icon()
/obj/item/weapon/material/twohanded/offhand/update_icon()
return
/*
* Fireaxe
*/
/obj/item/weapon/twohanded/fireaxe // DEM AXES MAN, marker -Agouri
/obj/item/weapon/material/twohanded/fireaxe // DEM AXES MAN, marker -Agouri
icon_state = "fireaxe0"
base_icon = "fireaxe"
name = "fire axe"
@@ -136,26 +144,18 @@
force_wielded = 30
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
/obj/item/weapon/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
/obj/item/weapon/material/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
if(!proximity) return
..()
if(A && wielded && (istype(A,/obj/structure/window) || istype(A,/obj/structure/grille))) //destroys windows and grilles in one hit
if(istype(A,/obj/structure/window)) //should just make a window.Break() proc but couldn't bother with it
var/obj/structure/window/W = A
new /obj/item/weapon/shard( W.loc )
if(W.reinf) PoolOrNew(/obj/item/stack/rods, W.loc)
if (W.dir == SOUTHWEST)
new /obj/item/weapon/shard( W.loc )
if(W.reinf) PoolOrNew(/obj/item/stack/rods, W.loc)
qdel(A)
W.shatter()
/*
* Double-Bladed Energy Swords - Cheridan
*/
/obj/item/weapon/twohanded/dualsaber
/obj/item/weapon/material/twohanded/dualsaber
icon_state = "dualsaber0"
base_icon = "dualsaber"
name = "double-bladed energy sword"
@@ -174,7 +174,7 @@
sharp = 1
edge = 1
/obj/item/weapon/twohanded/dualsaber/attack(target as mob, mob/living/user as mob)
/obj/item/weapon/material/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]."
@@ -186,14 +186,14 @@
user.set_dir(i)
sleep(1)
/obj/item/weapon/twohanded/dualsaber/IsShield()
/obj/item/weapon/material/twohanded/dualsaber/IsShield()
if(wielded)
return 1
else
return 0
//spears, bay edition
/obj/item/weapon/twohanded/spear
/obj/item/weapon/material/twohanded/spear
icon_state = "spearglass0"
base_icon = "spearglass"
name = "spear"
@@ -209,30 +209,4 @@
flags = NOSHIELD
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
/obj/item/weapon/twohanded/baseballbat
name = "wooden bat"
desc = "HOME RUN!"
icon_state = "woodbat0"
base_icon = "woodbat"
item_state = "woodbat"
sharp = 0
edge = 0
w_class = 3
force = 10
throw_speed = 3
throw_range = 7
throwforce = 7
attack_verb = list("smashed", "beaten", "slammed", "smacked", "struck", "battered", "bonked")
hitsound = 'sound/weapons/genhit3.ogg'
force_wielded = 20
/obj/item/weapon/twohanded/baseballbat/metal
name = "metal bat"
desc = "A shiny metal bat."
icon_state = "metalbat0"
base_icon = "metalbat"
item_state = "metalbat"
force = 15
w_class = 3.0
force_wielded = 25
default_material = "glass"

View File

@@ -1,120 +0,0 @@
// Glass shards
/obj/item/weapon/shard
name = "shard"
icon = 'icons/obj/shards.dmi'
icon_state = "large"
sharp = 1
edge = 1
desc = "Made of nothing. How does this even exist?" // set based on material, if this desc is visible it's a bug (shards default to being made of glass)
w_class = 2.0
force = 5.0
throwforce = 8.0
item_state = "shard-glass"
//matter = list("glass" = 3750) // Weld it into sheets before you use it!
attack_verb = list("stabbed", "slashed", "sliced", "cut")
gender = "neuter"
var/material/material = null
/obj/item/weapon/shard/suicide_act(mob/user)
viewers(user) << pick("\red <b>[user] is slitting \his wrists with \the [src]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his throat with \the [src]! It looks like \he's trying to commit suicide.</b>")
return (BRUTELOSS)
/obj/item/weapon/shard/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/obj/item/weapon/shard/Bump()
spawn( 0 )
if (prob(20))
src.force = 15
else
src.force = 4
..()
return
return
/obj/item/weapon/shard/New(loc, material/material)
..(loc)
if(!material || !istype(material)) // We either don't have a material or we've been passed an invalid material. Use glass instead.
material = get_material_by_name("glass")
set_material(material)
/obj/item/weapon/shard/proc/set_material(material/material)
if(istype(material))
src.material = material
icon_state = "[material.shard_icon][pick("large", "medium", "small")]"
pixel_x = rand(-8, 8)
pixel_y = rand(-8, 8)
update_material()
update_icon()
/obj/item/weapon/shard/proc/update_material()
if(material)
if(material.shard_type)
name = "[material.display_name] [material.shard_type]"
desc = "A small piece of [material.display_name]. It looks sharp, you wouldn't want to step on it barefoot. Could probably be used as ... a throwing weapon?"
switch(material.shard_type)
if(SHARD_SPLINTER, SHARD_SHRAPNEL)
gender = "plural"
else
gender = "neuter"
else
qdel(src)
return
else
name = initial(name)
desc = initial(desc)
/obj/item/weapon/shard/update_icon()
if(material)
color = material.icon_colour
// 1-(1-x)^2, so that glass shards with 0.3 opacity end up somewhat visible at 0.51 opacity
alpha = 255 * (1 - (1 - material.opacity)*(1 - material.opacity))
else
color = "#ffffff"
alpha = 255
/obj/item/weapon/shard/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/weldingtool) && material.shard_can_repair)
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
material.place_sheet(loc)
qdel(src)
return
return ..()
/obj/item/weapon/shard/Crossed(AM as mob|obj)
if(ismob(AM))
var/mob/M = AM
M << "\red <B>You step on \the [src]!</B>"
playsound(src.loc, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species.flags & IS_SYNTHETIC || (H.species.siemens_coefficient<0.5)) //Thick skin.
return
if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) )
var/obj/item/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
if(affecting.status & ORGAN_ROBOT)
return
if(affecting.take_damage(5, 0))
H.UpdateDamageIcon()
H.updatehealth()
if(!(H.species && (H.species.flags & NO_PAIN)))
H.Weaken(3)
..()
// Preset types - left here for the code that uses them
/obj/item/weapon/shard/shrapnel/New(loc)
..(loc, get_material_by_name("steel"))
/obj/item/weapon/shard/phoron/New(loc)
..(loc, get_material_by_name("phoron glass"))

View File

@@ -492,8 +492,8 @@
/obj/item/weapon/screwdriver,
/obj/item/weapon/wrench,
/obj/item/weapon/wirecutters,
/obj/item/weapon/kitchen/utensil/knife,
/obj/item/weapon/kitchen/utensil/fork,
/obj/item/weapon/material/kitchen/utensil/knife,
/obj/item/weapon/material/kitchen/utensil/fork,
/obj/item/weapon/hatchet
)
var/list/tools = list()

View File

@@ -0,0 +1,208 @@
/*
* Trays - Agouri
*/
/obj/item/weapon/tray
name = "tray"
icon = 'icons/obj/food.dmi'
icon_state = "tray"
desc = "A metal tray to lay food on."
throwforce = 12.0
throwforce = 10.0
throw_speed = 1
throw_range = 5
w_class = 3.0
flags = CONDUCT
matter = list(DEFAULT_WALL_MATERIAL = 3000)
var/list/carrying = list() // List of things on the tray. - Doohl
var/max_carry = 10
/obj/item/weapon/tray/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
// Drop all the things. All of them.
overlays.Cut()
for(var/obj/item/I in carrying)
I.loc = M.loc
carrying.Remove(I)
if(isturf(I.loc))
spawn()
for(var/i = 1, i <= rand(1,2), i++)
if(I)
step(I, pick(NORTH,SOUTH,EAST,WEST))
sleep(rand(2,4))
if((CLUMSY in user.mutations) && prob(50)) //What if he's a clown?
M << "\red You accidentally slam yourself with the [src]!"
M.Weaken(1)
user.take_organ_damage(2)
if(prob(50))
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
return
else
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin'
return //it always returns, but I feel like adding an extra return just for safety's sakes. EDIT; Oh well I won't :3
var/mob/living/carbon/human/H = M ///////////////////////////////////// /Let's have this ready for later.
if(!(user.zone_sel.selecting == ("eyes" || "head"))) //////////////hitting anything else other than the eyes
if(prob(33))
src.add_blood(H)
var/turf/location = H.loc
if (istype(location, /turf/simulated))
location.add_blood(H) ///Plik plik, the sound of blood
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>")
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
if(prob(15))
M.Weaken(3)
M.take_organ_damage(3)
else
M.take_organ_damage(5)
if(prob(50))
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
return
else
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //we applied the damage, we played the sound, we showed the appropriate messages. Time to return and stop the proc
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
return
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES)))
M << "\red You get slammed in the face with the tray, against your mask!"
if(prob(33))
src.add_blood(H)
if (H.wear_mask)
H.wear_mask.add_blood(H)
if (H.head)
H.head.add_blood(H)
if (H.glasses && prob(33))
H.glasses.add_blood(H)
var/turf/location = H.loc
if (istype(location, /turf/simulated)) //Addin' blood! At least on the floor and item :v
location.add_blood(H)
if(prob(50))
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
else
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin'
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
if(prob(10))
M.Stun(rand(1,3))
M.take_organ_damage(3)
return
else
M.take_organ_damage(5)
return
else //No eye or head protection, tough luck!
M << "\red You get slammed in the face with the tray!"
if(prob(33))
src.add_blood(M)
var/turf/location = H.loc
if (istype(location, /turf/simulated))
location.add_blood(H)
if(prob(50))
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] in the face with the tray!</B>", user, M), 1)
else
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin' again
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] in the face with the tray!</B>", user, M), 1)
if(prob(30))
M.Stun(rand(2,4))
M.take_organ_damage(4)
return
else
M.take_organ_damage(8)
if(prob(30))
M.Weaken(2)
return
return
/obj/item/weapon/tray/var/cooldown = 0 //shield bash cooldown. based on world.time
/obj/item/weapon/tray/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/material/kitchen/rollingpin))
if(cooldown < world.time - 25)
user.visible_message("<span class='warning'>[user] bashes [src] with [W]!</span>")
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
cooldown = world.time
else
..()
/*
===============~~~~~================================~~~~~====================
= =
= Code for trays carrying things. By Doohl for Doohl erryday Doohl Doohl~ =
= =
===============~~~~~================================~~~~~====================
*/
/obj/item/weapon/tray/proc/calc_carry()
// calculate the weight of the items on the tray
var/val = 0 // value to return
for(var/obj/item/I in carrying)
if(I.w_class == 1.0)
val ++
else if(I.w_class == 2.0)
val += 3
else
val += 5
return val
/obj/item/weapon/tray/pickup(mob/user)
if(!isturf(loc))
return
for(var/obj/item/I in loc)
if( I != src && !I.anchored && !istype(I, /obj/item/clothing/under) && !istype(I, /obj/item/clothing/suit) && !istype(I, /obj/item/projectile) )
var/add = 0
if(I.w_class == 1.0)
add = 1
else if(I.w_class == 2.0)
add = 3
else
add = 5
if(calc_carry() + add >= max_carry)
break
I.loc = src
carrying.Add(I)
overlays += image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = 30 + I.layer)
/obj/item/weapon/tray/dropped(mob/user)
var/mob/living/M
for(M in src.loc) //to handle hand switching
return
var/foundtable = 0
for(var/obj/structure/table/T in loc)
foundtable = 1
break
overlays.Cut()
for(var/obj/item/I in carrying)
I.loc = loc
carrying.Remove(I)
if(!foundtable && isturf(loc))
// if no table, presume that the person just shittily dropped the tray on the ground and made a mess everywhere!
spawn()
for(var/i = 1, i <= rand(1,2), i++)
if(I)
step(I, pick(NORTH,SOUTH,EAST,WEST))
sleep(rand(2,4))

View File

@@ -89,215 +89,6 @@
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/obj/item/weapon/claymore
name = "claymore"
desc = "What are you standing around staring at this for? Get to killing!"
icon_state = "claymore"
item_state = "claymore"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 40
throwforce = 10
sharp = 1
edge = 1
w_class = 3
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
IsShield()
return 1
suicide_act(mob/user)
viewers(user) << "<span class='danger'>[user] is falling on the [src.name]! It looks like \he's trying to commit suicide.</span>"
return(BRUTELOSS)
/obj/item/weapon/claymore/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/obj/item/weapon/katana
name = "katana"
desc = "Woefully underpowered in D20"
icon_state = "katana"
item_state = "katana"
flags = CONDUCT
slot_flags = SLOT_BELT | SLOT_BACK
force = 40
throwforce = 10
sharp = 1
edge = 1
w_class = 3
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
suicide_act(mob/user)
viewers(user) << "<span class='danger'>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</span>"
return(BRUTELOSS)
/obj/item/weapon/katana/IsShield()
return 1
/obj/item/weapon/katana/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/obj/item/weapon/harpoon
name = "harpoon"
sharp = 1
edge = 0
desc = "Tharr she blows!"
icon_state = "harpoon"
item_state = "harpoon"
force = 20
throwforce = 15
w_class = 3
attack_verb = list("jabbed","stabbed","ripped")
/obj/item/weapon/butterfly
name = "butterfly knife"
desc = "A basic metal blade concealed in a lightweight plasteel grip. Small enough when folded to fit in a pocket."
icon_state = "butterflyknife"
item_state = null
hitsound = null
var/active = 0
w_class = 2
force = 2
sharp = 0
edge = 0
throw_speed = 3
throw_range = 4
throwforce = 7
attack_verb = list("patted", "tapped")
/obj/item/butterflyconstruction
name = "unfinished concealed knife"
desc = "An unfinished concealed knife, it looks like the screws need to be tightened."
icon = 'icons/obj/buildingobject.dmi'
icon_state = "butterflystep1"
/obj/item/butterflyconstruction/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/screwdriver))
user << "You finish the concealed blade weapon."
new /obj/item/weapon/butterfly(user.loc)
qdel(src)
return
/obj/item/butterflyblade
name = "knife blade"
desc = "A knife blade. Unusable as a weapon without a grip."
icon = 'icons/obj/buildingobject.dmi'
icon_state = "butterfly2"
matter = list(DEFAULT_WALL_MATERIAL = 5000)
/obj/item/butterflyhandle
name = "concealed knife grip"
desc = "A plasteel grip with screw fittings for a blade."
icon = 'icons/obj/buildingobject.dmi'
icon_state = "butterfly1"
matter = list(DEFAULT_WALL_MATERIAL = 4000)
/obj/item/butterflyhandle/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/butterflyblade))
user << "You attach the two concealed blade parts."
new /obj/item/butterflyconstruction(user.loc)
qdel(W)
qdel(src)
return
update_icon(user)
/obj/item/weapon/butterfly/switchblade
name = "switchblade"
desc = "A classic switchblade with gold engraving. Just holding it makes you feel like a gangster."
icon_state = "switchblade"
/obj/item/weapon/butterfly/attack_self(mob/user)
active = !active
if(active)
user << "<span class='notice'>You flip out your [src].</span>"
playsound(user, 'sound/weapons/flipblade.ogg', 15, 1)
force = 15 //bay adjustments
throwforce = 12
edge = 1
sharp = 1
hitsound = 'sound/weapons/bladeslice.ogg'
icon_state += "_open"
w_class = 3
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
else
user << "<span class='notice'>The butterfly knife can now be concealed.</span>"
force = initial(force)
edge = 0
sharp = 0
hitsound = initial(hitsound)
icon_state = initial(icon_state)
w_class = initial(w_class)
attack_verb = initial(attack_verb)
add_fingerprint(user)
obj/item/weapon/wirerod
name = "wired rod"
desc = "A rod with some wire wrapped around the top. It'd be easy to attach something to the top bit."
icon_state = "wiredrod"
item_state = "rods"
flags = CONDUCT
force = 8
throwforce = 10
w_class = 3
attack_verb = list("hit", "bludgeoned", "whacked", "bonked")
obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob)
..()
if(istype(I, /obj/item/weapon/shard))
var/obj/item/weapon/twohanded/spear/S = new /obj/item/weapon/twohanded/spear
user.put_in_hands(S)
user << "<span class='notice'>You fasten the glass shard to the top of the rod with the cable.</span>"
qdel(I)
qdel(src)
update_icon(user)
else if(istype(I, /obj/item/weapon/wirecutters))
var/obj/item/weapon/melee/baton/cattleprod/P = new /obj/item/weapon/melee/baton/cattleprod
user.put_in_hands(P)
user << "<span class='notice'>You fasten the wirecutters to the top of the rod with the cable, prongs outward.</span>"
qdel(I)
qdel(src)
update_icon(user)
update_icon(user)
/obj/item/weapon/star
name = "shuriken"
desc = "A sharp, perfectly weighted piece of metal."
icon_state = "star"
force = 5
throw_speed = 10
throwforce = 15
throw_range = 15
sharp = 1
edge = 1
matter = list(DEFAULT_WALL_MATERIAL = 500)
var/poisoned = 0
/obj/item/weapon/star/New()
..()
src.pixel_x = rand(-12, 12)
src.pixel_y = rand(-12, 12)
//TODO: consider making this something done with reagents.
/obj/item/weapon/star/throw_impact(atom/hit_atom)
..()
if(poisoned && istype(hit_atom,/mob/living))
var/mob/living/M = hit_atom
M.adjustToxLoss(rand(20,40))
poisoned = 0
color = null
/obj/item/weapon/star/ninja
color = "#007700"
poisoned = 1
/obj/item/weapon/energy_net
name = "energy net"
desc = "It's a net made of green energy."

View File

@@ -162,11 +162,11 @@
prob(2);/obj/item/weapon/storage/pill_bottle/happy,\
prob(2);/obj/item/weapon/storage/pill_bottle/zoom,\
prob(5);/obj/item/weapon/contraband/poster,\
prob(2);/obj/item/weapon/butterfly,\
prob(2);/obj/item/weapon/material/butterfly,\
prob(3);/obj/item/butterflyblade,\
prob(3);/obj/item/butterflyhandle,\
prob(3);/obj/item/weapon/wirerod,\
prob(1);/obj/item/weapon/butterfly/switchblade,\
prob(1);/obj/item/weapon/material/butterfly/switchblade,\
prob(1);/obj/item/weapon/reagent_containers/syringe/drugs)

View File

@@ -2,7 +2,7 @@
/obj/structure/closet/fireaxecabinet
name = "fire axe cabinet"
desc = "There is small label that reads \"For Emergency use only\" along with details for safe use of the axe. As if."
var/obj/item/weapon/twohanded/fireaxe/fireaxe
var/obj/item/weapon/material/twohanded/fireaxe/fireaxe
icon_state = "fireaxe1000"
icon_closed = "fireaxe1000"
icon_opened = "fireaxe1100"
@@ -16,7 +16,7 @@
New()
..()
fireaxe = new /obj/item/weapon/twohanded/fireaxe(src)
fireaxe = new /obj/item/weapon/material/twohanded/fireaxe(src)
attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
//..() //That's very useful, Erro
@@ -55,7 +55,7 @@
src.localopened = 1
update_icon()
return
if (istype(O, /obj/item/weapon/twohanded/fireaxe) && src.localopened)
if (istype(O, /obj/item/weapon/material/twohanded/fireaxe) && src.localopened)
if(!fireaxe)
if(O:wielded)
user << "\red Unwield the axe first."

View File

@@ -13,7 +13,7 @@
/obj/structure/displaycase/ex_act(severity)
switch(severity)
if (1)
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
if (occupied)
new /obj/item/weapon/gun/energy/captain( src.loc )
occupied = 0
@@ -37,7 +37,7 @@
/obj/structure/displaycase/blob_act()
if (prob(75))
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
if (occupied)
new /obj/item/weapon/gun/energy/captain( src.loc )
occupied = 0
@@ -45,7 +45,7 @@
/obj/structure/displaycase/meteorhit(obj/O as obj)
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
new /obj/item/weapon/gun/energy/captain( src.loc )
qdel(src)
@@ -55,7 +55,7 @@
if (!( src.destroyed ))
src.density = 0
src.destroyed = 1
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
playsound(src, "shatter", 70, 1)
update_icon()
else

View File

@@ -153,7 +153,7 @@
return
//window placing end
else if(istype(W, /obj/item/weapon/shard))
else if(istype(W, /obj/item/weapon/material/shard))
health -= W.force * 0.1
else if(!shock(user, 70))
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)

View File

@@ -13,7 +13,7 @@
/obj/structure/lamarr/ex_act(severity)
switch(severity)
if (1)
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
Break()
qdel(src)
if (2)
@@ -35,13 +35,13 @@
/obj/structure/lamarr/blob_act()
if (prob(75))
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
Break()
qdel(src)
/obj/structure/lamarr/meteorhit(obj/O as obj)
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
Break()
qdel(src)
@@ -51,7 +51,7 @@
if (!( src.destroyed ))
src.density = 0
src.destroyed = 1
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
playsound(src, "shatter", 70, 1)
Break()
else

View File

@@ -13,7 +13,7 @@
var/state = 2
var/reinf = 0
var/basestate
var/shardtype = /obj/item/weapon/shard
var/shardtype = /obj/item/weapon/material/shard
var/glasstype = null // Set this in subtypes. Null is assumed strange or otherwise impossible to dismantle, such as for shuttle glass.
var/silicate = 0 // number of units of silicate
@@ -87,11 +87,11 @@
var/index = null
index = 0
while(index < 2)
new shardtype(loc)
new shardtype(loc) //todo pooling?
if(reinf) PoolOrNew(/obj/item/stack/rods, loc)
index++
else
new shardtype(loc)
new shardtype(loc) //todo pooling?
if(reinf) PoolOrNew(/obj/item/stack/rods, loc)
qdel(src)
return
@@ -406,7 +406,7 @@
desc = "A phoron-glass alloy window. It looks insanely tough to break. It appears it's also insanely tough to burn through."
basestate = "phoronwindow"
icon_state = "phoronwindow"
shardtype = /obj/item/weapon/shard/phoron
shardtype = /obj/item/weapon/material/shard/phoron
glasstype = /obj/item/stack/sheet/glass/phoronglass
maxhealth = 120
@@ -420,7 +420,7 @@
desc = "A phoron-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic phoron windows are insanely fireproof."
basestate = "phoronrwindow"
icon_state = "phoronrwindow"
shardtype = /obj/item/weapon/shard/phoron
shardtype = /obj/item/weapon/material/shard/phoron
glasstype = /obj/item/stack/sheet/glass/phoronrglass
reinf = 1
maxhealth = 160

View File

@@ -597,7 +597,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/thunderdome(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle/destroyer(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/kitchenknife(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/material/knife(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/grenade/smokebomb(M), slot_r_store)
@@ -620,10 +620,10 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/head/chefhat(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/kitchen/rollingpin(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/kitchenknife(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/kitchenknife(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/kitchenknife(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/weapon/material/kitchen/rollingpin(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/material/knife(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/material/knife(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/material/knife(M), slot_s_store)
if ("tournament janitor")
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/janitor(M), slot_w_uniform)
@@ -687,7 +687,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
var/obj/item/weapon/twohanded/fireaxe/fire_axe = new(M)
var/obj/item/weapon/material/twohanded/fireaxe/fire_axe = new(M)
M.equip_to_slot_or_del(fire_axe, slot_r_hand)
if("masked killer")
@@ -699,10 +699,10 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/plain/monocle(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/apron(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/kitchenknife(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/material/knife(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/scalpel(M), slot_r_store)
var/obj/item/weapon/twohanded/fireaxe/fire_axe = new(M)
var/obj/item/weapon/material/twohanded/fireaxe/fire_axe = new(M)
M.equip_to_slot_or_del(fire_axe, slot_r_hand)
for(var/obj/item/carried_item in M.contents)

View File

@@ -212,7 +212,7 @@
interface_name = "death blossom launcher"
interface_desc = "An integrated microfactory that produces poisoned throwing stars from thin air and electricity."
var/fabrication_type = /obj/item/weapon/star/ninja
var/fabrication_type = /obj/item/weapon/material/star/ninja
var/fire_force = 30
var/fire_distance = 10

View File

@@ -51,14 +51,14 @@
//Chef
/obj/item/clothing/suit/chef
name = "Chef's apron"
name = "chef's apron"
desc = "An apron used by a high class chef."
icon_state = "chef"
item_state = "chef"
gas_transfer_coefficient = 0.90
permeability_coefficient = 0.50
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
allowed = list (/obj/item/weapon/kitchenknife,/obj/item/weapon/butch)
allowed = list (/obj/item/weapon/material/knife)
sprite_sheets = list("Vox" = 'icons/mob/species/vox/suit.dmi')
//Chef

View File

@@ -73,10 +73,10 @@
..()
hold.max_storage_space = 4
hold.can_hold = list(/obj/item/weapon/hatchet/unathiknife,\
/obj/item/weapon/kitchen/utensil/knife,\
/obj/item/weapon/kitchen/utensil/pknife,\
/obj/item/weapon/kitchenknife,\
/obj/item/weapon/kitchenknife/ritual)
/obj/item/weapon/material/kitchen/utensil/knife,\
/obj/item/weapon/material/kitchen/utensil/knife/plastic,\
/obj/item/weapon/material/knife,\
/obj/item/weapon/material/knife/ritual)
new /obj/item/weapon/hatchet/unathiknife(hold)
new /obj/item/weapon/hatchet/unathiknife(hold)

View File

@@ -45,7 +45,7 @@
/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) || istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/kitchenknife/ritual))
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/material/kitchen/utensil/knife) || istype(W, /obj/item/weapon/material/knife) || istype(W, /obj/item/weapon/material/knife/ritual))
user << "<span class='notice'>You use [W] to fashion a pipe out of the corn cob!</span>"
new /obj/item/clothing/mask/smokable/pipe/cobpipe (user.loc)
qdel(src)

View File

@@ -226,7 +226,7 @@
return
scanner.computer.inventory.Add(src)
user << "[W]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'"
else if(istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/wirecutters))
else if(istype(W, /obj/item/weapon/material/knife) || istype(W, /obj/item/weapon/wirecutters))
if(carved) return
user << "<span class='notice'>You begin to carve out [title].</span>"
if(do_after(user, 30))

View File

@@ -13,7 +13,6 @@ var/list/name_to_material
/proc/get_material_by_name(name)
if(!name_to_material)
populate_material_list()
return name_to_material[name]
/*
@@ -28,23 +27,30 @@ var/list/name_to_material
var/name // Tag for use in overlay generation/list population .
var/display_name
var/flags = 0
var/icon_base = "metal"
var/rotting_touch_message = "crumbles under your touch"
// Shards/tables/structures
var/tableslam_noise = 'sound/weapons/tablehit1.ogg'
var/shard_type = SHARD_SHRAPNEL
var/shard_icon
var/shard_can_repair = 1
// Icons
var/icon_colour
var/icon_base = "metal"
var/icon_reinf = "reinf_metal"
var/stack_type
// Attributes
var/cut_delay = 0
var/radioactivity
var/ignition_point
var/melting_point = 1800 // K, walls will take damage if they're next to a fire hotter than this
var/integrity = 150 // Damage before wall falls apart, essentially.
var/hardness = 60 // Used to determine if a hulk can punch through this wall.
var/rotting_touch_message = "crumbles under your touch"
var/opacity = 1
var/explosion_resistance = 5
var/shard_type = SHARD_SHRAPNEL
var/shard_icon
var/shard_can_repair = 1
var/tableslam_noise = 'sound/weapons/tablehit1.ogg'
var/weight = 20
/material/New()
..()
@@ -53,6 +59,15 @@ var/list/name_to_material
if(!shard_icon)
shard_icon = shard_type
/material/proc/get_blunt_damage()
return weight //todo
/material/proc/get_edge_damage()
return round(hardness/4) //todo
/material/proc/products_need_process()
return (radioactivity>0) //todo
/material/placeholder
name = "placeholder"
@@ -72,7 +87,7 @@ var/list/name_to_material
/material/proc/place_shard(var/turf/target)
if(shard_type)
return new /obj/item/weapon/shard(target, src)
return new /obj/item/weapon/material/shard(target, src.name)
/material/proc/is_brittle()
return !!(flags & MATERIAL_BRITTLE)
@@ -84,6 +99,7 @@ var/list/name_to_material
icon_base = "stone"
icon_reinf = "reinf_stone"
icon_colour = "#007A00"
weight = 22
/material/diamond
name = "diamond"
@@ -94,16 +110,21 @@ var/list/name_to_material
opacity = 0.4
shard_type = SHARD_SHARD
tableslam_noise = 'sound/effects/Glasshit.ogg'
hardness = 100
/material/gold
name = "gold"
stack_type = /obj/item/stack/sheet/mineral/gold
icon_colour = "#EDD12F"
weight = 24
hardness = 40
/material/silver
name = "silver"
stack_type = /obj/item/stack/sheet/mineral/silver
icon_colour = "#D1E6E3"
weight = 22
hardness = 50
/material/phoron
name = "phoron"
@@ -112,6 +133,7 @@ var/list/name_to_material
icon_base = "stone"
icon_colour = "#FC2BC5"
shard_type = SHARD_SHARD
hardness = 30
/material/sandstone
name = "sandstone"
@@ -120,6 +142,8 @@ var/list/name_to_material
icon_reinf = "reinf_stone"
icon_colour = "#D9C179"
shard_type = SHARD_STONE_PIECE
weight = 22
hardness = 55
/material/steel
name = DEFAULT_WALL_MATERIAL
@@ -143,6 +167,8 @@ var/list/name_to_material
icon_reinf = "reinf_over"
icon_colour = "#777777"
explosion_resistance = 25
hardness = 80
weight = 23
/material/glass
name = "glass"
@@ -153,6 +179,8 @@ var/list/name_to_material
integrity = 100
shard_type = SHARD_SHARD
tableslam_noise = 'sound/effects/Glasshit.ogg'
hardness = 15
weight = 15
/material/glass/phoron
name = "phoron glass"
@@ -161,6 +189,8 @@ var/list/name_to_material
ignition_point = 300
integrity = 200 // idk why but phoron windows are strong, so.
icon_colour = "#FC2BC5"
hardness = 10
weight = 10
/material/plastic
name = "plastic"
@@ -169,6 +199,8 @@ var/list/name_to_material
icon_base = "solid"
icon_reinf = "reinf_over"
icon_colour = "#CCCCCC"
hardness = 10
weight = 12
/material/osmium
name = "osmium"
@@ -189,11 +221,13 @@ var/list/name_to_material
name = "platinum"
stack_type = /obj/item/stack/sheet/mineral/platinum
icon_colour = "#9999FF"
weight = 27
/material/iron
name = "iron"
stack_type = /obj/item/stack/sheet/mineral/iron
icon_colour = "#5C5454"
weight = 22
/material/wood
name = "wood"
@@ -204,6 +238,8 @@ var/list/name_to_material
explosion_resistance = 2
shard_type = SHARD_SPLINTER
shard_can_repair = 0 // you can't weld splinters back into planks
hardness = 15
weight = 18
/material/wood/holographic
name = "holographic wood"

View File

@@ -109,7 +109,7 @@
if(91)
new/obj/item/device/soulstone(src)
if(92)
new/obj/item/weapon/katana(src)
new/obj/item/weapon/material/katana(src)
if(93)
new/obj/item/weapon/dnainjector/xraymut(src) // Probably the least OP
if(94) // Why the hell not

View File

@@ -356,12 +356,12 @@
if(5)
var/quantity = rand(1,3)
for(var/i=0, i<quantity, i++)
new /obj/item/weapon/shard(src)
new /obj/item/weapon/material/shard(src)
if(6)
var/quantity = rand(1,3)
for(var/i=0, i<quantity, i++)
new /obj/item/weapon/shard/phoron(src)
new /obj/item/weapon/material/shard/phoron(src)
if(7)
var/obj/item/stack/sheet/mineral/uranium/R = new(src)

View File

@@ -132,7 +132,7 @@
/mob/living/carbon/proc/swap_hand()
var/obj/item/item_in_hand = src.get_active_hand()
if(item_in_hand) //this segment checks if the item in your hand is twohanded.
if(istype(item_in_hand,/obj/item/weapon/twohanded))
if(istype(item_in_hand,/obj/item/weapon/material/twohanded))
if(item_in_hand:wielded == 1)
usr << "<span class='warning'>Your other hand is too busy holding the [item_in_hand.name]</span>"
return
@@ -452,17 +452,17 @@
Stun(stun_duration)
Weaken(Floor(stun_duration/2))
return 1
/mob/living/carbon/proc/add_chemical_effect(var/effect, var/magnitude = 1)
if(effect in chem_effects)
chem_effects[effect] += magnitude
else
chem_effects[effect] = magnitude
chem_effects[effect] = magnitude
/mob/living/carbon/get_default_language()
if(default_language)
return default_language
if(!species)
return null
return species.default_language ? all_languages[species.default_language] : null
return species.default_language ? all_languages[species.default_language] : null

View File

@@ -1026,7 +1026,7 @@
var/list/visible_implants = list()
for(var/obj/item/organ/external/organ in src.organs)
for(var/obj/item/weapon/O in organ.implants)
if(!istype(O,/obj/item/weapon/implant) && (O.w_class > class) && !istype(O,/obj/item/weapon/shard/shrapnel))
if(!istype(O,/obj/item/weapon/implant) && (O.w_class > class) && !istype(O,/obj/item/weapon/material/shard/shrapnel))
visible_implants += O
return(visible_implants)

View File

@@ -43,7 +43,7 @@ emp_act
if(P.can_embed())
var/armor = getarmor_organ(organ, "bullet")
if(prob(20 + max(P.damage - armor, -10)))
var/obj/item/weapon/shard/shrapnel/SP = new()
var/obj/item/weapon/material/shard/shrapnel/SP = new()
SP.name = (P.name != "shrapnel")? "[P.name] shrapnel" : "shrapnel"
SP.desc = "[SP.desc] It looks like it was fired from [P.shot_from]."
SP.loc = organ

View File

@@ -328,10 +328,10 @@
else if(istype(W,/obj/item/ammo_casing))
if(metal)
metal.add_charge(1000)
else if(istype(W,/obj/item/weapon/shard/shrapnel))
else if(istype(W,/obj/item/weapon/material/shard/shrapnel))
if(metal)
metal.add_charge(1000)
else if(istype(W,/obj/item/weapon/shard))
else if(istype(W,/obj/item/weapon/material/shard))
if(glass)
glass.add_charge(1000)
else if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/grown))

View File

@@ -170,16 +170,16 @@
var/obj/O
//shards
O = new /obj/item/weapon/shard(src.loc)
O = new /obj/item/weapon/material/shard(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(75))
O = new /obj/item/weapon/shard(src.loc)
O = new /obj/item/weapon/material/shard(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(50))
O = new /obj/item/weapon/shard(src.loc)
O = new /obj/item/weapon/material/shard(src.loc)
step_to(O, get_turf(pick(view(7, src))))
if(prob(25))
O = new /obj/item/weapon/shard(src.loc)
O = new /obj/item/weapon/material/shard(src.loc)
step_to(O, get_turf(pick(view(7, src))))
//rods

View File

@@ -20,7 +20,7 @@
attacktext = "punched"
a_intent = I_HURT
var/corpse = /obj/effect/landmark/mobcorpse/russian
var/weapon1 = /obj/item/weapon/kitchenknife
var/weapon1 = /obj/item/weapon/material/knife
min_oxy = 5
max_oxy = 0
min_tox = 0

View File

@@ -281,7 +281,7 @@
else
user << "<span class='notice'>\The [src] is dead, medical items won't bring it back to life.</span>"
if(meat_type && (stat == DEAD)) //if the animal has a meat, and if it is dead.
if(istype(O, /obj/item/weapon/kitchenknife) || istype(O, /obj/item/weapon/butch))
if(istype(O, /obj/item/weapon/material/knife) || istype(O, /obj/item/weapon/material/knife/butch))
harvest(user)
else
user.changeNext_move(8)

View File

@@ -91,8 +91,8 @@ var/list/solars_list = list()
if(!(stat & BROKEN))
broken()
else
new /obj/item/weapon/shard(src.loc)
new /obj/item/weapon/shard(src.loc)
new /obj/item/weapon/material/shard(src.loc)
new /obj/item/weapon/material/shard(src.loc)
qdel(src)
return
return
@@ -153,13 +153,13 @@ var/list/solars_list = list()
switch(severity)
if(1.0)
if(prob(15))
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
qdel(src)
return
if(2.0)
if (prob(25))
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
qdel(src)
return
@@ -420,7 +420,7 @@ var/list/solars_list = list()
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
var/obj/item/weapon/circuitboard/solar_control/M = new /obj/item/weapon/circuitboard/solar_control( A )
for (var/obj/C in src)
C.loc = src.loc

View File

@@ -234,7 +234,7 @@
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
var/obj/item/weapon/circuitboard/turbine_control/M = new /obj/item/weapon/circuitboard/turbine_control( A )
for (var/obj/C in src)
C.loc = src.loc

View File

@@ -41,7 +41,7 @@
/obj/item/weapon/arrow/rod/removed(mob/user)
if(throwforce == 15) // The rod has been superheated - we don't want it to be useable when removed from the bow.
user << "[src] shatters into a scattering of overstressed metal shards as it leaves the crossbow."
var/obj/item/weapon/shard/shrapnel/S = new()
var/obj/item/weapon/material/shard/shrapnel/S = new()
S.loc = get_turf(src)
qdel(src)

View File

@@ -16,7 +16,7 @@
var/obj/item/weapon/broken_bottle/B = new /obj/item/weapon/broken_bottle(user.loc)
user.put_in_active_hand(B)
if(prob(33))
new/obj/item/weapon/shard(target.loc) // Create a glass shard at the target's location!
new/obj/item/weapon/material/shard(target.loc) // Create a glass shard at the target's location!
B.icon_state = src.icon_state
var/icon/I = new('icons/obj/drinks.dmi', src.icon_state)

View File

@@ -1,6 +1,6 @@
/obj/item/weapon/reagent_containers/food/snacks/breadslice/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/shard) || istype(W,/obj/item/weapon/reagent_containers/food/snacks))
if(istype(W,/obj/item/weapon/material/shard) || istype(W,/obj/item/weapon/reagent_containers/food/snacks))
var/obj/item/weapon/reagent_containers/food/snacks/csandwich/S = new(get_turf(src))
S.attackby(W,user)
qdel(src)
@@ -25,7 +25,7 @@
if(src.contents.len > sandwich_limit)
user << "\red If you put anything else on \the [src] it's going to collapse."
return
else if(istype(W,/obj/item/weapon/shard))
else if(istype(W,/obj/item/weapon/material/shard))
user << "\blue You hide [W] in \the [src]."
user.drop_item()
W.loc = src
@@ -87,7 +87,7 @@
var/obj/item/shard
for(var/obj/item/O in contents)
if(istype(O,/obj/item/weapon/shard))
if(istype(O,/obj/item/weapon/material/shard))
shard = O
break

View File

@@ -48,12 +48,12 @@
if(H.species.flags & IS_SYNTHETIC)
H << "<span class='danger'>You have a monitor for a head, where do you think you're going to put that?</span>"
return
var/obj/item/blocked = H.check_mouth_coverage()
if(blocked)
user << "<span class='warning'>\The [blocked] is in the way!</span>"
return
if (fullness <= 50)
M << "<span class='danger'>You hungrily chew out a piece of [src] and gobble it!</span>"
if (fullness > 50 && fullness <= 150)
@@ -71,7 +71,7 @@
if(H.species.flags & IS_SYNTHETIC)
user << "<span class='danger'>They have a monitor for a head, where do you think you're going to put that?</span>"
return
var/obj/item/blocked = H.check_mouth_coverage()
if(blocked)
user << "<span class='warning'>\The [blocked] is in the way!</span>"
@@ -128,8 +128,8 @@
return
// Eating with forks
if(istype(W,/obj/item/weapon/kitchen/utensil))
var/obj/item/weapon/kitchen/utensil/U = W
if(istype(W,/obj/item/weapon/material/kitchen/utensil))
var/obj/item/weapon/material/kitchen/utensil/U = W
if(!U.reagents)
U.create_reagents(5)
@@ -186,9 +186,9 @@
var/reagents_per_slice = reagents.total_volume/slices_num
for(var/i=1 to (slices_num-slices_lost))
var/obj/slice = new slice_path (src.loc)
var/obj/slice = new slice_path (src.loc)
reagents.trans_to_obj(slice, reagents_per_slice)
qdel(src)
qdel(src)
return
/obj/item/weapon/reagent_containers/food/snacks/proc/is_sliceable()
@@ -2819,7 +2819,7 @@
// Dough + rolling pin = flat dough
/obj/item/weapon/reagent_containers/food/snacks/dough/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/kitchen/rollingpin))
if(istype(W,/obj/item/weapon/material/kitchen/rollingpin))
new /obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough(src)
user << "You flatten the dough."
qdel(src)
@@ -2964,7 +2964,7 @@
// potato + knife = raw sticks
/obj/item/weapon/reagent_containers/food/snacks/grown/potato/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/kitchen/utensil/knife))
if(istype(W,/obj/item/weapon/material/kitchen/utensil/knife))
new /obj/item/weapon/reagent_containers/food/snacks/rawsticks(src)
user << "You cut the potato."
qdel(src)

View File

@@ -10,7 +10,7 @@
src.bitesize = 3
/obj/item/weapon/reagent_containers/food/snacks/meat/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/kitchenknife))
if(istype(W,/obj/item/weapon/material/knife))
new /obj/item/weapon/reagent_containers/food/snacks/rawcutlet(src)
new /obj/item/weapon/reagent_containers/food/snacks/rawcutlet(src)
new /obj/item/weapon/reagent_containers/food/snacks/rawcutlet(src)

View File

@@ -20,17 +20,17 @@
/obj/structure/crystal/Destroy()
src.visible_message("\red<b>[src] shatters!</b>")
if(prob(75))
new /obj/item/weapon/shard/phoron(src.loc)
new /obj/item/weapon/material/shard/phoron(src.loc)
if(prob(50))
new /obj/item/weapon/shard/phoron(src.loc)
new /obj/item/weapon/material/shard/phoron(src.loc)
if(prob(25))
new /obj/item/weapon/shard/phoron(src.loc)
new /obj/item/weapon/material/shard/phoron(src.loc)
if(prob(75))
new /obj/item/weapon/shard(src.loc)
new /obj/item/weapon/material/shard(src.loc)
if(prob(50))
new /obj/item/weapon/shard(src.loc)
new /obj/item/weapon/material/shard(src.loc)
if(prob(25))
new /obj/item/weapon/shard(src.loc)
new /obj/item/weapon/material/shard(src.loc)
..()
//todo: laser_act

View File

@@ -43,7 +43,7 @@
/obj/item/weapon/autopsy_scanner,\
/obj/item/weapon/bikehorn,\
/obj/item/weapon/bonesetter,\
/obj/item/weapon/butch,\
/obj/item/weapon/material/knife/butch,\
/obj/item/weapon/caution,\
/obj/item/weapon/caution/cone,\
/obj/item/weapon/crowbar,\
@@ -53,7 +53,7 @@
/obj/item/weapon/hatchet,\
/obj/item/weapon/handcuffs,\
/obj/item/weapon/hemostat,\
/obj/item/weapon/kitchenknife,\
/obj/item/weapon/material/knife,\
/obj/item/weapon/flame/lighter,\
/obj/item/weapon/light/bulb,\
/obj/item/weapon/light/tube,\

View File

@@ -136,11 +136,11 @@
if(3)
item_type = "[pick("fork","spoon","knife")]"
if(prob(25))
new_item = new /obj/item/weapon/kitchen/utensil/fork(src.loc)
new_item = new /obj/item/weapon/material/kitchen/utensil/fork(src.loc)
else if(prob(50))
new_item = new /obj/item/weapon/kitchen/utensil/knife(src.loc)
new_item = new /obj/item/weapon/material/kitchen/utensil/knife(src.loc)
else
new_item = new /obj/item/weapon/kitchen/utensil/spoon(src.loc)
new_item = new /obj/item/weapon/material/kitchen/utensil/spoon(src.loc)
additional_desc = "[pick("It's like no [item_type] you've ever seen before",\
"It's a mystery how anyone is supposed to eat with this",\
"You wonder what the creator's mouth was shaped like")]."
@@ -167,7 +167,7 @@
"You wonder what kind of music was made with it")]."
if(6)
item_type = "[pick("bladed knife","serrated blade","sharp cutting implement")]"
new_item = new /obj/item/weapon/kitchenknife(src.loc)
new_item = new /obj/item/weapon/material/knife(src.loc)
additional_desc = "[pick("It doesn't look safe.",\
"It looks wickedly jagged",\
"There appear to be [pick("dark red","dark purple","dark green","dark blue")] stains along the edges")]."
@@ -315,9 +315,9 @@
apply_material_decorations = 0
if(22)
if(prob(50))
new_item = new /obj/item/weapon/shard(src.loc)
new_item = new /obj/item/weapon/material/shard(src.loc)
else
new_item = new /obj/item/weapon/shard/phoron(src.loc)
new_item = new /obj/item/weapon/material/shard/phoron(src.loc)
apply_prefix = 0
apply_image_decorations = 0
apply_material_decorations = 0
@@ -337,7 +337,7 @@
apply_material_decorations = 0
if(25)
apply_prefix = 0
new_item = new /obj/item/weapon/katana(src.loc)
new_item = new /obj/item/weapon/material/katana(src.loc)
new_item.force = 10
item_type = new_item.name
if(26)

View File

@@ -6,7 +6,7 @@
allowed_tools = list(
/obj/item/weapon/hemostat = 100, \
/obj/item/weapon/wirecutters = 75, \
/obj/item/weapon/kitchen/utensil/fork = 20
/obj/item/weapon/material/kitchen/utensil/fork = 20
)
priority = 3

View File

@@ -20,8 +20,8 @@
/datum/surgery_step/eye/cut_open
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
/obj/item/weapon/material/knife = 75, \
/obj/item/weapon/material/shard = 50, \
)
min_duration = 90
@@ -52,7 +52,7 @@
/datum/surgery_step/eye/lift_eyes
allowed_tools = list(
/obj/item/weapon/retractor = 100, \
/obj/item/weapon/kitchen/utensil/fork = 50
/obj/item/weapon/material/kitchen/utensil/fork = 50
)
min_duration = 30

View File

@@ -17,8 +17,8 @@
/datum/surgery_step/generic/cut_face
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
/obj/item/weapon/material/knife = 75, \
/obj/item/weapon/material/shard = 50, \
)
min_duration = 90
@@ -76,7 +76,7 @@
allowed_tools = list(
/obj/item/weapon/retractor = 100, \
/obj/item/weapon/crowbar = 55, \
/obj/item/weapon/kitchen/utensil/fork = 75)
/obj/item/weapon/material/kitchen/utensil/fork = 75)
min_duration = 80
max_duration = 100

View File

@@ -110,8 +110,8 @@
/datum/surgery_step/generic/cut_open
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
/obj/item/weapon/material/knife = 75, \
/obj/item/weapon/material/shard = 50, \
)
min_duration = 90
@@ -185,7 +185,7 @@
allowed_tools = list(
/obj/item/weapon/retractor = 100, \
/obj/item/weapon/crowbar = 75, \
/obj/item/weapon/kitchen/utensil/fork = 50
/obj/item/weapon/material/kitchen/utensil/fork = 50
)
min_duration = 30

View File

@@ -150,7 +150,7 @@
allowed_tools = list(
/obj/item/weapon/hemostat = 100, \
/obj/item/weapon/wirecutters = 75, \
/obj/item/weapon/kitchen/utensil/fork = 20
/obj/item/weapon/material/kitchen/utensil/fork = 20
)
min_duration = 80

View File

@@ -19,7 +19,7 @@
allowed_tools = list(
/obj/item/weapon/hemostat = 100, \
/obj/item/weapon/wirecutters = 75, \
/obj/item/weapon/kitchen/utensil/fork = 20
/obj/item/weapon/material/kitchen/utensil/fork = 20
)
blood_level = 2
@@ -211,8 +211,8 @@
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
/obj/item/weapon/material/knife = 75, \
/obj/item/weapon/material/shard = 50, \
)
min_duration = 90
@@ -267,7 +267,7 @@
allowed_tools = list(
/obj/item/weapon/hemostat = 100, \
/obj/item/weapon/wirecutters = 75, \
/obj/item/weapon/kitchen/utensil/fork = 20
/obj/item/weapon/material/kitchen/utensil/fork = 20
)
min_duration = 60
@@ -447,8 +447,8 @@
// /datum/surgery_step/ribcage/heart/cut
// allowed_tools = list(
// /obj/item/weapon/scalpel = 100, \
// /obj/item/weapon/kitchenknife = 75, \
// /obj/item/weapon/shard = 50, \
// /obj/item/weapon/material/knife = 75, \
// /obj/item/weapon/material/shard = 50, \
// )
// min_duration = 30

View File

@@ -56,8 +56,8 @@
priority = 2
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
/obj/item/weapon/material/knife = 75, \
/obj/item/weapon/material/shard = 50, \
)
can_infect = 1

View File

@@ -12,8 +12,8 @@
/datum/surgery_step/slime/cut_flesh
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
/obj/item/weapon/material/knife = 75, \
/obj/item/weapon/material/shard = 50, \
)
min_duration = 30
@@ -38,8 +38,8 @@
/datum/surgery_step/slime/cut_innards
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
/obj/item/weapon/material/knife = 75, \
/obj/item/weapon/material/shard = 50, \
)
min_duration = 30

View File

@@ -89,7 +89,7 @@
playsound(loc, 'sound/weapons/tablehit1.ogg', 50, 1)
var/list/L = take_damage(rand(1,5))
// Shards. Extra damage, plus potentially the fact YOU LITERALLY HAVE A PIECE OF GLASS/METAL/WHATEVER IN YOUR FACE
for(var/obj/item/weapon/shard/S in L)
for(var/obj/item/weapon/material/shard/S in L)
if(prob(50))
M.visible_message("<span class='danger'>\The [S] slices [M]'s face messily!</span>",
"<span class='danger'>\The [S] slices your face messily!</span>")

View File

@@ -1,5 +1,3 @@
/obj/structure/table
name = "table frame"
icon = 'icons/obj/tables.dmi'
@@ -255,7 +253,7 @@
qdel(src)
return
// Returns a list of /obj/item/weapon/shard objects that were created as a result of this table's breakage.
// Returns a list of /obj/item/weapon/material/shard objects that were created as a result of this table's breakage.
// Used for !fun! things such as embedding shards in the faces of tableslammed people.
// The repeated
@@ -265,7 +263,7 @@
/obj/structure/table/proc/break_to_parts(full_return = 0)
var/list/shards = list()
var/obj/item/weapon/shard/S = null
var/obj/item/weapon/material/shard/S = null
if(reinforced)
if(reinforced.stack_type && (full_return || prob(20)))
reinforced.place_sheet(loc)