Merge remote-tracking branch 'upstream/dev-freeze' into dev

This commit is contained in:
PsiOmega
2015-05-22 08:39:07 +02:00
224 changed files with 3659 additions and 3235 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
/obj/item/apc_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( get_turf(src.loc), 2 )
new /obj/item/stack/material/steel( get_turf(src.loc), 2 )
qdel(src)
/obj/item/apc_frame/proc/try_build(turf/on_wall)
+60 -88
View File
@@ -1,25 +1,54 @@
/obj/item/ashtray
icon = 'icons/ashtray.dmi'
var/
max_butts = 0
empty_desc = ""
icon_empty = ""
icon_half = ""
icon_full = ""
icon_broken = ""
var/global/list/ashtray_cache = list()
/obj/item/ashtray/New()
..()
/obj/item/weapon/material/ashtray
name = "ashtray"
icon = 'icons/obj/objects.dmi'
icon_state = "blank"
force_divisor = 0.1
thrown_force_divisor = 0.1
var/image/base_image
var/max_butts = 10
/obj/item/weapon/material/ashtray/New(var/newloc, var/material_name)
..(newloc, material_name)
if(!material)
qdel(src)
return
max_butts = round(material.hardness/10) //This is arbitrary but whatever.
src.pixel_y = rand(-5, 5)
src.pixel_x = rand(-6, 6)
update_icon()
return
/obj/item/ashtray/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (health < 1)
/obj/item/weapon/material/ashtray/update_icon()
color = null
overlays.Cut()
var/cache_key = "base-[material.name]"
if(!ashtray_cache[cache_key])
var/image/I = image('icons/obj/objects.dmi',"ashtray")
I.color = material.icon_colour
ashtray_cache[cache_key] = I
overlays |= ashtray_cache[cache_key]
if (contents.len == max_butts)
if(!ashtray_cache["full"])
ashtray_cache["full"] = image('icons/obj/objects.dmi',"ashtray_full")
overlays |= ashtray_cache["full"]
desc = "It's stuffed full."
else if (contents.len > max_butts/2)
if(!ashtray_cache["half"])
ashtray_cache["half"] = image('icons/obj/objects.dmi',"ashtray_half")
overlays |= ashtray_cache["half"]
desc = "It's half-filled."
else
desc = "An ashtray made of [material.display_name]."
/obj/item/weapon/material/ashtray/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (health <= 0)
return
if (istype(W,/obj/item/weapon/cigbutt) || istype(W,/obj/item/clothing/mask/smokable/cigarette) || istype(W, /obj/item/weapon/flame/match))
if (contents.len >= max_butts)
user << "This ashtray is full."
user << "\The [src] is full."
return
user.remove_from_mob(W)
W.loc = src
@@ -27,12 +56,14 @@
if (istype(W,/obj/item/clothing/mask/smokable/cigarette))
var/obj/item/clothing/mask/smokable/cigarette/cig = W
if (cig.lit == 1)
src.visible_message("[user] crushes [cig] in [src], putting it out.")
src.visible_message("[user] crushes [cig] in \the [src], putting it out.")
processing_objects.Remove(cig)
var/obj/item/butt = new cig.type_butt(src)
cig.transfer_fingerprints_to(butt)
qdel(cig)
W = butt
spawn(1)
TemperatureAct(150)
else if (cig.lit == 0)
user << "You place [cig] in [src] without even smoking it. Why would you do that?"
@@ -40,12 +71,7 @@
user.update_inv_l_hand()
user.update_inv_r_hand()
add_fingerprint(user)
if (contents.len == max_butts)
icon_state = icon_full
desc = empty_desc + " It's stuffed full."
else if (contents.len > max_butts/2)
icon_state = icon_half
desc = empty_desc + " It's half-filled."
update_icon()
else
health = max(0,health - W.force)
user << "You hit [src] with [W]."
@@ -53,83 +79,29 @@
die()
return
/obj/item/ashtray/throw_impact(atom/hit_atom)
/obj/item/weapon/material/ashtray/throw_impact(atom/hit_atom)
if (health > 0)
health = max(0,health - 3)
if (health < 1)
die()
return
if (contents.len)
src.visible_message("\red [src] slams into [hit_atom] spilling its contents!")
src.visible_message("<span class='danger'>\The [src] slams into [hit_atom], spilling its contents!</span>")
for (var/obj/item/clothing/mask/smokable/cigarette/O in contents)
O.loc = src.loc
icon_state = icon_empty
update_icon()
return ..()
/obj/item/ashtray/proc/die()
src.visible_message("\red [src] shatters spilling its contents!")
for (var/obj/item/clothing/mask/smokable/cigarette/O in contents)
O.loc = src.loc
icon_state = icon_broken
/obj/item/weapon/material/ashtray/proc/die()
material.place_shard(get_turf(src))
qdel(src)
return
/obj/item/ashtray/plastic
name = "plastic ashtray"
desc = "Cheap plastic ashtray."
icon_state = "ashtray_bl"
icon_empty = "ashtray_bl"
icon_half = "ashtray_half_bl"
icon_full = "ashtray_full_bl"
icon_broken = "ashtray_bork_bl"
max_butts = 14
health = 24.0
matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 30)
empty_desc = "Cheap plastic ashtray."
throwforce = 3.0
die()
..()
name = "pieces of plastic"
desc = "Pieces of plastic with ash on them."
return
/obj/item/weapon/material/ashtray/plastic/New(var/newloc)
..(newloc, "plastic")
/obj/item/weapon/material/ashtray/bronze/New(var/newloc)
..(newloc, "gold") //placeholder
/obj/item/ashtray/bronze
name = "bronze ashtray"
desc = "Massive bronze ashtray."
icon_state = "ashtray_br"
icon_empty = "ashtray_br"
icon_half = "ashtray_half_br"
icon_full = "ashtray_full_br"
icon_broken = "ashtray_bork_br"
max_butts = 10
health = 72.0
matter = list(DEFAULT_WALL_MATERIAL = 80)
empty_desc = "Massive bronze ashtray."
throwforce = 10.0
die()
..()
name = "pieces of bronze"
desc = "Pieces of bronze with ash on them."
return
/obj/item/ashtray/glass
name = "glass ashtray"
desc = "Glass ashtray. Looks fragile."
icon_state = "ashtray_gl"
icon_empty = "ashtray_gl"
icon_half = "ashtray_half_gl"
icon_full = "ashtray_full_gl"
icon_broken = "ashtray_bork_gl"
max_butts = 12
health = 12.0
matter = list("glass" = 60)
empty_desc = "Glass ashtray. Looks fragile."
throwforce = 6.0
die()
..()
name = "shards of glass"
desc = "Shards of glass with ash on them."
playsound(src, "shatter", 30, 1)
return
/obj/item/weapon/material/ashtray/glass/New(var/newloc)
..(newloc, "glass")
@@ -108,7 +108,7 @@
mode_nice = design
mode = "[replacetext(design, "-", "")]full"
if("corner")
var/design = input("Which design?", "Floor painter") in list("black", "red", "blue", "green", "yellow", "purple", "neutral", "white", "white-grey", "white-red", "white-blue", "white-green", "white-yellow", "white-purple")
var/design = input("Which design?", "Floor painter") in list("black", "red", "blue", "green", "yellow", "purple", "neutral", "white", "white-red", "white-blue", "white-green", "white-yellow", "white-purple")
mode_nice = "[design] corner"
mode = "[replacetext(design, "-", "")]corner"
tile_dir_mode = 2
@@ -128,11 +128,13 @@
if(design == "white")
mode = "whitehall"
mode_nice = "white side"
tile_dir_mode = 1
else if(design == "black") // because SOMEONE made the black/grey side/corner sprite have the same name as the 'empty space' sprite :(
mode = "blackfloor"
mode_nice = design
else
mode_nice = design
mode = replacetext(design, "-", "")
tile_dir_mode = 1
tile_dir_mode = 1
if("special")
var/design = input("Which design?", "Floor painter") in list("arrival", "escape", "caution", "warning", "white-warning", "white-blue-green", "loadingarea", "delivery", "bot", "white-delivery", "white-bot")
if(design == "white-blue-green")
@@ -71,8 +71,8 @@
Emag()
return
if(istype(W, /obj/item/stack/sheet/glass))
var/obj/item/stack/sheet/glass/G = W
if(istype(W, /obj/item/stack/material/glass))
var/obj/item/stack/material/glass/G = W
if(uses >= max_uses)
user << "<span class='warning'>[src.name] is full."
return
+2 -2
View File
@@ -125,8 +125,8 @@
/obj/item/robot_parts/robot_suit/attackby(obj/item/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/stack/sheet/metal) && !l_arm && !r_arm && !l_leg && !r_leg && !chest && !head)
var/obj/item/stack/sheet/metal/M = W
if(istype(W, /obj/item/stack/material/steel) && !l_arm && !r_arm && !l_leg && !r_leg && !chest && !head)
var/obj/item/stack/material/steel/M = W
if (M.use(1))
var/obj/item/weapon/secbot_assembly/ed209_assembly/B = new /obj/item/weapon/secbot_assembly/ed209_assembly
B.loc = get_turf(src)
+1 -1
View File
@@ -32,7 +32,7 @@
return
if(WT.remove_fuel(0,user))
var/obj/item/stack/sheet/metal/new_item = new(usr.loc)
var/obj/item/stack/material/steel/new_item = new(usr.loc)
new_item.add_to_stacks(usr)
for (var/mob/M in viewers(src))
M.show_message("\red [src] is shaped into metal by [user.name] with the weldingtool.", 3, "\red You hear welding.", 2)
+16 -51
View File
@@ -10,32 +10,19 @@
/*
* Glass sheets
*/
/obj/item/stack/sheet/glass
/obj/item/stack/material/glass
name = "glass"
desc = "HOLY SHEET! That is a lot of glass."
singular_name = "glass sheet"
icon_state = "sheet-glass"
matter = list("glass" = 3750)
origin_tech = "materials=1"
var/created_window = /obj/structure/window/basic
var/is_reinforced = 0
var/list/construction_options = list("One Direction", "Full Window")
sheettype = "glass"
default_type = "glass"
/obj/item/stack/sheet/glass/cyborg
name = "glass synthesizer"
desc = "A device that makes glass."
gender = NEUTER
singular_name = "glass"
matter = null
uses_charge = 1
charge_costs = list(1000)
stacktype = /obj/item/stack/sheet/glass
/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
/obj/item/stack/material/glass/attack_self(mob/user as mob)
construct_window(user)
/obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user)
/obj/item/stack/material/glass/attackby(obj/item/W, mob/user)
..()
if(!is_reinforced)
if(istype(W,/obj/item/stack/cable_coil))
@@ -54,10 +41,10 @@
user << "<span class='warning'>You need one rod and one sheet of glass to make reinforced glass.</span>"
return
var/obj/item/stack/sheet/glass/reinforced/RG = new (user.loc)
var/obj/item/stack/material/glass/reinforced/RG = new (user.loc)
RG.add_fingerprint(user)
RG.add_to_stacks(user)
var/obj/item/stack/sheet/glass/G = src
var/obj/item/stack/material/glass/G = src
src = null
var/replace = (user.get_inactive_hand()==G)
V.use(1)
@@ -65,7 +52,7 @@
if (!G && replace)
user.put_in_hands(RG)
/obj/item/stack/sheet/glass/proc/construct_window(mob/user as mob)
/obj/item/stack/material/glass/proc/construct_window(mob/user as mob)
if(!user || !src) return 0
if(!istype(user.loc,/turf)) return 0
if(!user.IsAdvancedToolUser())
@@ -139,53 +126,34 @@
/*
* Reinforced glass sheets
*/
/obj/item/stack/sheet/glass/reinforced
/obj/item/stack/material/glass/reinforced
name = "reinforced glass"
desc = "Glass which has been reinforced with metal rods."
singular_name = "reinforced glass sheet"
icon_state = "sheet-rglass"
matter = list(DEFAULT_WALL_MATERIAL = 1875,"glass" = 3750)
origin_tech = "materials=2"
default_type = "reinforced glass"
created_window = /obj/structure/window/reinforced
is_reinforced = 1
construction_options = list("One Direction", "Full Window", "Windoor")
/obj/item/stack/sheet/glass/reinforced/cyborg
name = "reinforced glass synthesizer"
desc = "A device that makes reinforced glass."
gender = NEUTER
matter = null
uses_charge = 2
charge_costs = list(1000)
singular_name = "reinforced glass sheet"
icon_state = "sheet-rglass"
charge_costs = list(500, 1000)
stacktype = /obj/item/stack/sheet/glass/reinforced
/*
* Phoron Glass sheets
*/
/obj/item/stack/sheet/glass/phoronglass
/obj/item/stack/material/glass/phoronglass
name = "phoron glass"
desc = "A very strong and very resistant sheet of a phoron-glass alloy."
singular_name = "phoron glass sheet"
icon_state = "sheet-phoronglass"
matter = list("glass" = 7500)
origin_tech = "materials=3;phorontech=2"
created_window = /obj/structure/window/phoronbasic
sheettype = "phoronglass"
default_type = "phoron glass"
/obj/item/stack/sheet/glass/phoronglass/attackby(obj/item/W, mob/user)
/obj/item/stack/material/glass/phoronglass/attackby(obj/item/W, mob/user)
..()
if( istype(W, /obj/item/stack/rods) )
var/obj/item/stack/rods/V = W
var/obj/item/stack/sheet/glass/phoronrglass/RG = new (user.loc)
var/obj/item/stack/material/glass/phoronrglass/RG = new (user.loc)
RG.add_fingerprint(user)
RG.add_to_stacks(user)
V.use(1)
var/obj/item/stack/sheet/glass/G = src
var/obj/item/stack/material/glass/G = src
src = null
var/replace = (user.get_inactive_hand()==G)
G.use(1)
@@ -197,13 +165,10 @@
/*
* Reinforced phoron glass sheets
*/
/obj/item/stack/sheet/glass/phoronrglass
/obj/item/stack/material/glass/phoronrglass
name = "reinforced phoron glass"
desc = "Phoron glass which has been reinforced with metal rods."
singular_name = "reinforced phoron glass sheet"
icon_state = "sheet-phoronrglass"
matter = list("glass" = 7500,DEFAULT_WALL_MATERIAL = 1875)
origin_tech = "materials=4;phorontech=2"
default_type = "reinforced phoron glass"
created_window = /obj/structure/window/phoronreinforced
is_reinforced = 1
@@ -1,39 +1,39 @@
/obj/item/stack/sheet/animalhide/human
/obj/item/stack/material/animalhide/human
name = "human skin"
desc = "The by-product of human farming."
singular_name = "human skin piece"
icon_state = "sheet-hide"
origin_tech = ""
/obj/item/stack/sheet/animalhide/corgi
/obj/item/stack/material/animalhide/corgi
name = "corgi hide"
desc = "The by-product of corgi farming."
singular_name = "corgi hide piece"
icon_state = "sheet-corgi"
origin_tech = ""
/obj/item/stack/sheet/animalhide/cat
/obj/item/stack/material/animalhide/cat
name = "cat hide"
desc = "The by-product of cat farming."
singular_name = "cat hide piece"
icon_state = "sheet-cat"
origin_tech = ""
/obj/item/stack/sheet/animalhide/monkey
/obj/item/stack/material/animalhide/monkey
name = "monkey hide"
desc = "The by-product of monkey farming."
singular_name = "monkey hide piece"
icon_state = "sheet-monkey"
origin_tech = ""
/obj/item/stack/sheet/animalhide/lizard
/obj/item/stack/material/animalhide/lizard
name = "lizard skin"
desc = "Sssssss..."
singular_name = "lizard skin piece"
icon_state = "sheet-lizard"
origin_tech = ""
/obj/item/stack/sheet/animalhide/xeno
/obj/item/stack/material/animalhide/xeno
name = "alien hide"
desc = "The skin of a terrible creature."
singular_name = "alien hide piece"
@@ -41,7 +41,7 @@
origin_tech = ""
//don't see anywhere else to put these, maybe together they could be used to make the xenos suit?
/obj/item/stack/sheet/xenochitin
/obj/item/stack/material/xenochitin
name = "alien chitin"
desc = "A piece of the hide of a terrible creature."
singular_name = "alien hide piece"
@@ -63,14 +63,14 @@
icon_state = "weed_extract"
origin_tech = ""
/obj/item/stack/sheet/hairlesshide
/obj/item/stack/material/hairlesshide
name = "hairless hide"
desc = "This hide was stripped of it's hair, but still needs tanning."
singular_name = "hairless hide piece"
icon_state = "sheet-hairlesshide"
origin_tech = ""
/obj/item/stack/sheet/wetleather
/obj/item/stack/material/wetleather
name = "wet leather"
desc = "This leather has been cleaned but still needs to be dried."
singular_name = "wet leather piece"
@@ -79,35 +79,25 @@
var/wetness = 30 //Reduced when exposed to high temperautres
var/drying_threshold_temperature = 500 //Kelvin to start drying
/obj/item/stack/sheet/leather
name = "leather"
desc = "The by-product of mob grinding."
singular_name = "leather piece"
icon_state = "sheet-leather"
origin_tech = "materials=2"
//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) || \
istype(W, /obj/item/weapon/hatchet) )
/obj/item/stack/material/animalhide/attackby(obj/item/weapon/W as obj, mob/user as mob)
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/material/hatchet) )
//visible message on mobs is defined as visible_message(var/message, var/self_message, var/blind_message)
usr.visible_message("\blue \the [usr] starts cutting hair off \the [src]", "\blue You start cutting the hair off \the [src]", "You hear the sound of a knife rubbing against flesh")
if(do_after(user,50))
usr << "\blue You cut the hair from this [src.singular_name]"
//Try locating an exisitng stack on the tile and add to there if possible
for(var/obj/item/stack/sheet/hairlesshide/HS in usr.loc)
for(var/obj/item/stack/material/hairlesshide/HS in usr.loc)
if(HS.amount < 50)
HS.amount++
src.use(1)
break
//If it gets to here it means it did not find a suitable stack on the tile.
var/obj/item/stack/sheet/hairlesshide/HS = new(usr.loc)
var/obj/item/stack/material/hairlesshide/HS = new(usr.loc)
HS.amount = 1
src.use(1)
else
@@ -117,20 +107,20 @@
//Step two - washing..... it's actually in washing machine code.
//Step three - drying
/obj/item/stack/sheet/wetleather/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/item/stack/material/wetleather/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
..()
if(exposed_temperature >= drying_threshold_temperature)
wetness--
if(wetness == 0)
//Try locating an exisitng stack on the tile and add to there if possible
for(var/obj/item/stack/sheet/leather/HS in src.loc)
for(var/obj/item/stack/material/leather/HS in src.loc)
if(HS.amount < 50)
HS.amount++
src.use(1)
wetness = initial(wetness)
break
//If it gets to here it means it did not find a suitable stack on the tile.
var/obj/item/stack/sheet/leather/HS = new(src.loc)
var/obj/item/stack/material/leather/HS = new(src.loc)
HS.amount = 1
wetness = initial(wetness)
src.use(1)
@@ -17,13 +17,13 @@
var/obj/item/stack/cable_coil/CC = new/obj/item/stack/cable_coil(user.loc)
CC.amount = 5
amount--
new/obj/item/stack/sheet/glass(user.loc)
new/obj/item/stack/material/glass(user.loc)
if(amount <= 0)
user.drop_from_inventory(src)
qdel(src)
if(istype(O,/obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = O
if(istype(O,/obj/item/stack/material/steel))
var/obj/item/stack/material/steel/M = O
if (M.use(1))
use(1)
new/obj/item/stack/tile/light(get_turf(user))
@@ -1,209 +0,0 @@
/*
Mineral Sheets
Contains:
- Sandstone
- Diamond
- Uranium
- Phoron
- Gold
- Silver
- Enriched Uranium
- Platinum
- Metallic Hydrogen
- Tritium
- Osmium
*/
var/global/list/datum/stack_recipe/sandstone_recipes = list ( \
new/datum/stack_recipe("pile of dirt", /obj/machinery/portable_atmospherics/hydroponics/soil, 3, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("sandstone door", /obj/structure/mineral_door/sandstone, 10, one_per_turf = 1, on_floor = 1), \
)
var/global/list/datum/stack_recipe/silver_recipes = list ( \
new/datum/stack_recipe("silver door", /obj/structure/mineral_door/silver, 10, one_per_turf = 1, on_floor = 1), \
)
var/global/list/datum/stack_recipe/diamond_recipes = list ( \
new/datum/stack_recipe("diamond door", /obj/structure/mineral_door/transparent/diamond, 10, one_per_turf = 1, on_floor = 1), \
)
var/global/list/datum/stack_recipe/uranium_recipes = list ( \
new/datum/stack_recipe("uranium door", /obj/structure/mineral_door/uranium, 10, one_per_turf = 1, on_floor = 1), \
)
var/global/list/datum/stack_recipe/gold_recipes = list ( \
new/datum/stack_recipe("golden door", /obj/structure/mineral_door/gold, 10, one_per_turf = 1, on_floor = 1), \
)
var/global/list/datum/stack_recipe/phoron_recipes = list ( \
new/datum/stack_recipe("phoron door", /obj/structure/mineral_door/transparent/phoron, 10, one_per_turf = 1, on_floor = 1), \
)
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 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
new/datum/stack_recipe("reagent dispenser cartridge (med)", /obj/item/weapon/reagent_containers/chem_disp_cartridge/medium, 3, on_floor=0), // 250u
new/datum/stack_recipe("reagent dispenser cartridge (small)", /obj/item/weapon/reagent_containers/chem_disp_cartridge/small, 1, on_floor=0) // 100u
)
var/global/list/datum/stack_recipe/iron_recipes = list ( \
new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = 1, on_floor = 1), \
null, \
)
/obj/item/stack/sheet/mineral
force = 5.0
throwforce = 5
w_class = 3.0
throw_speed = 3
throw_range = 3
/obj/item/stack/sheet/mineral/New()
..()
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
obj/item/stack/sheet/mineral/iron
name = "iron"
icon_state = "sheet-silver"
origin_tech = "materials=1"
sheettype = "iron"
color = "#333333"
perunit = 3750
obj/item/stack/sheet/mineral/iron/New()
..()
recipes = iron_recipes
/obj/item/stack/sheet/mineral/sandstone
name = "sandstone brick"
desc = "This appears to be a combination of both sand and stone."
singular_name = "sandstone brick"
icon_state = "sheet-sandstone"
throw_speed = 4
throw_range = 5
origin_tech = "materials=1"
sheettype = "sandstone"
/obj/item/stack/sheet/mineral/sandstone/New()
..()
recipes = sandstone_recipes
/obj/item/stack/sheet/mineral/diamond
name = "diamond"
icon_state = "sheet-diamond"
origin_tech = "materials=6"
perunit = 3750
sheettype = "diamond"
/obj/item/stack/sheet/mineral/diamond/New()
..()
recipes = diamond_recipes
/obj/item/stack/sheet/mineral/uranium
name = "uranium"
icon_state = "sheet-uranium"
origin_tech = "materials=5"
perunit = 2000
sheettype = "uranium"
/obj/item/stack/sheet/mineral/uranium/New()
..()
recipes = uranium_recipes
/obj/item/stack/sheet/mineral/phoron
name = "solid phoron"
icon_state = "sheet-phoron"
origin_tech = "phorontech=2;materials=2"
perunit = 2000
sheettype = "phoron"
/obj/item/stack/sheet/mineral/phoron/New()
..()
recipes = phoron_recipes
/obj/item/stack/sheet/mineral/plastic
name = "Plastic"
icon_state = "sheet-plastic"
origin_tech = "materials=3"
perunit = 2000
sheettype = "plastic"
/obj/item/stack/sheet/mineral/plastic/New()
..()
recipes = plastic_recipes
/obj/item/stack/sheet/mineral/plastic/cyborg
name = "plastic sheets synthesizer"
gender = NEUTER
uses_charge = 1
charge_costs = list(1000)
stacktype = /obj/item/stack/sheet/mineral/plastic
/obj/item/stack/sheet/mineral/gold
name = "gold"
icon_state = "sheet-gold"
origin_tech = "materials=4"
perunit = 2000
sheettype = "gold"
/obj/item/stack/sheet/mineral/gold/New()
..()
recipes = gold_recipes
/obj/item/stack/sheet/mineral/silver
name = "silver"
icon_state = "sheet-silver"
origin_tech = "materials=3"
perunit = 2000
sheettype = "silver"
/obj/item/stack/sheet/mineral/silver/New()
..()
recipes = silver_recipes
/obj/item/stack/sheet/mineral/enruranium
name = "enriched uranium"
icon_state = "sheet-enruranium"
origin_tech = "materials=5"
perunit = 1000
//Valuable resource, cargo can sell it.
/obj/item/stack/sheet/mineral/platinum
name = "platinum"
icon_state = "sheet-adamantine"
origin_tech = "materials=2"
sheettype = "platinum"
perunit = 2000
//Extremely valuable to Research.
/obj/item/stack/sheet/mineral/mhydrogen
name = "metallic hydrogen"
icon_state = "sheet-mythril"
origin_tech = "materials=6;powerstorage=5;magnets=5"
sheettype = "mhydrogen"
perunit = 2000
//Fuel for MRSPACMAN generator.
/obj/item/stack/sheet/mineral/tritium
name = "tritium"
icon_state = "sheet-silver"
sheettype = "tritium"
origin_tech = "materials=5"
color = "#777777"
perunit = 2000
/obj/item/stack/sheet/mineral/osmium
name = "osmium"
icon_state = "sheet-silver"
sheettype = "osmium"
origin_tech = "materials=5"
color = "#9999FF"
perunit = 2000
@@ -1,223 +0,0 @@
/* Diffrent misc types of sheets
* Contains:
* Metal
* Plasteel
* Wood
* Cloth
* Cardboard
*/
/*
* Metal
*/
var/global/list/datum/stack_recipe/metal_recipes = list ( \
new/datum/stack_recipe("stool", /obj/item/weapon/stool, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("chair", /obj/structure/bed/chair, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("bed", /obj/structure/bed, 2, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe_list("office chairs",list( \
new/datum/stack_recipe("dark office chair", /obj/structure/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("light office chair", /obj/structure/bed/chair/office/light, 5, one_per_turf = 1, on_floor = 1), \
), 5), \
new/datum/stack_recipe_list("comfy chairs", list( \
new/datum/stack_recipe("beige comfy chair", /obj/structure/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("black comfy chair", /obj/structure/bed/chair/comfy/black, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("brown comfy chair", /obj/structure/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("lime comfy chair", /obj/structure/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("teal comfy chair", /obj/structure/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("red comfy chair", /obj/structure/bed/chair/comfy/red, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("blue comfy chair", /obj/structure/bed/chair/comfy/blue, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("purple comfy chair", /obj/structure/bed/chair/comfy/purp, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("green comfy chair", /obj/structure/bed/chair/comfy/green, 2, one_per_turf = 1, on_floor = 1), \
), 2), \
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("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), \
null, \
new/datum/stack_recipe("cannon frame", /obj/item/weapon/cannonframe, 10, time = 15, one_per_turf = 0, on_floor = 0), \
null, \
new/datum/stack_recipe("floor tile", /obj/item/stack/tile/plasteel, 1, 4, 20), \
new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60), \
null, \
new/datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, time = 25, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe_list("airlock assemblies", list( \
new/datum/stack_recipe("standard airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("command airlock assembly", /obj/structure/door_assembly/door_assembly_com, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("security airlock assembly", /obj/structure/door_assembly/door_assembly_sec, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("engineering airlock assembly", /obj/structure/door_assembly/door_assembly_eng, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("mining airlock assembly", /obj/structure/door_assembly/door_assembly_min, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("atmospherics airlock assembly", /obj/structure/door_assembly/door_assembly_atmo, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("research airlock assembly", /obj/structure/door_assembly/door_assembly_research, 4, time = 50, one_per_turf = 1, on_floor = 1), \
/* new/datum/stack_recipe("science airlock assembly", /obj/structure/door_assembly/door_assembly_science, 4, time = 50, one_per_turf = 1, on_floor = 1), \ */
new/datum/stack_recipe("medical airlock assembly", /obj/structure/door_assembly/door_assembly_med, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("maintenance airlock assembly", /obj/structure/door_assembly/door_assembly_mai, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("external airlock assembly", /obj/structure/door_assembly/door_assembly_ext, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("freezer airlock assembly", /obj/structure/door_assembly/door_assembly_fre, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("airtight hatch assembly", /obj/structure/door_assembly/door_assembly_hatch, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("maintenance hatch assembly", /obj/structure/door_assembly/door_assembly_mhatch, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("high security airlock assembly", /obj/structure/door_assembly/door_assembly_highsecurity, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("emergency shutter", /obj/structure/firedoor_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("multi-tile airlock assembly", /obj/structure/door_assembly/multi_tile, 4, time = 50, one_per_turf = 1, on_floor = 1), \
), 4), \
null, \
new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \
new/datum/stack_recipe("light fixture frame", /obj/item/frame/light, 2), \
new/datum/stack_recipe("small light fixture frame", /obj/item/frame/light/small, 1), \
null, \
new/datum/stack_recipe("apc frame", /obj/item/apc_frame, 2), \
new/datum/stack_recipe("air alarm frame", /obj/item/frame/air_alarm, 2), \
new/datum/stack_recipe("fire alarm frame", /obj/item/frame/fire_alarm, 2), \
null, \
new/datum/stack_recipe("knife blade", /obj/item/butterflyblade, 6, time = 20, one_per_turf = 0, on_floor = 1) \
)
/obj/item/stack/sheet/metal
name = DEFAULT_WALL_MATERIAL
desc = "Sheets made out off steel."
singular_name = "metal sheet"
icon_state = "sheet-metal"
matter = list(DEFAULT_WALL_MATERIAL = 3750)
throwforce = 14.0
flags = CONDUCT
origin_tech = "materials=1"
sheettype = DEFAULT_WALL_MATERIAL
/obj/item/stack/sheet/metal/cyborg
name = "steel synthesizer"
desc = "A device that makes steel sheets."
gender = NEUTER
matter = null
uses_charge = 1
charge_costs = list(1000)
stacktype = /obj/item/stack/sheet/metal
/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
recipes = metal_recipes
return ..()
/*
* Plasteel
*/
var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1), \
new/datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 50, one_per_turf = 1), \
new/datum/stack_recipe("RUST fuel assembly port frame", /obj/item/frame/rust/assembly, 12, time = 50, one_per_turf = 1), \
new/datum/stack_recipe("RUST fuel compressor frame", /obj/item/frame/rust, 12, time = 50, one_per_turf = 1), \
new/datum/stack_recipe("knife grip", /obj/item/butterflyhandle, 4, time = 20, one_per_turf = 0, on_floor = 1),
)
/obj/item/stack/sheet/plasteel
name = "plasteel"
singular_name = "plasteel sheet"
desc = "This sheet is an alloy of iron and platinum."
icon_state = "sheet-plasteel"
item_state = "sheet-metal"
matter = list(DEFAULT_WALL_MATERIAL = 7500)
throwforce = 15.0
flags = CONDUCT
origin_tech = "materials=2"
sheettype = "plasteel"
/obj/item/stack/sheet/plasteel/cyborg
name = "plasteel synthesizer"
desc = "A device that makes plasteel sheets."
gender = NEUTER
singular_name = "plasteel sheet"
matter = null
uses_charge = 1
charge_costs = list(1000)
stacktype = /obj/item/stack/sheet/plasteel
/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null)
recipes = plasteel_recipes
return ..()
/*
* Wood
*/
var/global/list/datum/stack_recipe/wood_recipes = list ( \
new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \
new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \
new/datum/stack_recipe("wooden chair", /obj/structure/bed/chair/wood, 3, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \
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("apiary", /obj/item/apiary, 10, time = 25, one_per_turf = 0, on_floor = 0)
)
/obj/item/stack/sheet/wood
name = "wooden plank"
desc = "One can only guess that this is a bunch of wood."
singular_name = "wood plank"
icon_state = "sheet-wood"
origin_tech = "materials=1;biotech=1"
sheettype = "wood"
/obj/item/stack/sheet/wood/cyborg
name = "wood synthesizer"
desc = "A device that makes wooden planks."
gender = NEUTER
singular_name = "wood plank"
icon_state = "sheet-wood"
uses_charge = 1
charge_costs = list(1000)
stacktype = /obj/item/stack/sheet/wood
/obj/item/stack/sheet/wood/New(var/loc, var/amount=null)
recipes = wood_recipes
return ..()
/*
* Cloth
*/
/obj/item/stack/sheet/cloth
name = "cloth"
desc = "This roll of cloth is made from only the finest chemicals and bunny rabbits."
singular_name = "cloth roll"
icon_state = "sheet-cloth"
origin_tech = "materials=2"
/*
* Cardboard
*/
var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
new/datum/stack_recipe("box", /obj/item/weapon/storage/box), \
new/datum/stack_recipe("donut box", /obj/item/weapon/storage/box/donut/empty), \
new/datum/stack_recipe("egg box", /obj/item/weapon/storage/fancy/egg_box), \
new/datum/stack_recipe("light tubes", /obj/item/weapon/storage/box/lights/tubes), \
new/datum/stack_recipe("light bulbs", /obj/item/weapon/storage/box/lights/bulbs), \
new/datum/stack_recipe("mouse traps", /obj/item/weapon/storage/box/mousetraps), \
new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), \
new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg), \
new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \
null, \
new/datum/stack_recipe_list("folders",list( \
new/datum/stack_recipe("blue folder", /obj/item/weapon/folder/blue), \
new/datum/stack_recipe("grey folder", /obj/item/weapon/folder), \
new/datum/stack_recipe("red folder", /obj/item/weapon/folder/red), \
new/datum/stack_recipe("white folder", /obj/item/weapon/folder/white), \
new/datum/stack_recipe("yellow folder", /obj/item/weapon/folder/yellow), \
)) \
)
/obj/item/stack/sheet/cardboard //BubbleWrap
name = "cardboard"
desc = "Large sheets of card, like boxes folded flat."
singular_name = "cardboard sheet"
icon_state = "sheet-card"
origin_tech = "materials=1"
/obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null)
recipes = cardboard_recipes
return ..()
@@ -1,25 +0,0 @@
/obj/item/stack/sheet
name = "sheet"
w_class = 3.0
force = 5
throwforce = 5
max_amount = 50
throw_speed = 3
throw_range = 3
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
var/perunit = 3750
var/sheettype = null //this is used for girders in the creation of walls/false walls
// Since the sheetsnatcher was consolidated into weapon/storage/bag we now use
// item/attackby() properly, making this unnecessary
/*/obj/item/stack/sheet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/storage/bag/sheetsnatcher))
var/obj/item/weapon/storage/bag/sheetsnatcher/S = W
if(!S.mode)
S.add(src,user)
else
for (var/obj/item/stack/sheet/stack in locate(src.x,src.y,src.z))
S.add(stack,user)
..()*/
+9 -2
View File
@@ -129,7 +129,11 @@
return
if (use(required))
var/atom/O = new recipe.result_type(user.loc)
var/atom/O
if(recipe.use_material)
O = new recipe.result_type(user.loc, recipe.use_material)
else
O = new recipe.result_type(user.loc)
O.set_dir(user.dir)
O.add_fingerprint(user)
@@ -338,7 +342,9 @@
var/time = 0
var/one_per_turf = 0
var/on_floor = 0
New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0)
var/use_material
New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0, supplied_material = null)
src.title = title
src.result_type = result_type
src.req_amount = req_amount
@@ -347,6 +353,7 @@
src.time = time
src.one_per_turf = one_per_turf
src.on_floor = on_floor
src.use_material = supplied_material
/*
* Recipe list datum
@@ -28,7 +28,7 @@
/obj/item/stack/tile/light/attackby(var/obj/item/O as obj, var/mob/user as mob)
..()
if(istype(O,/obj/item/weapon/crowbar))
new/obj/item/stack/sheet/metal(user.loc)
new/obj/item/stack/material/steel(user.loc)
amount--
new/obj/item/stack/light_w(user.loc)
if(amount <= 0)
@@ -110,8 +110,8 @@
var/list/the_targets = list(T,T1,T2)
for(var/a = 1 to spray_particles)
spawn(0)
var/obj/effect/effect/water/W = PoolOrNew(new /obj/effect/effect/water, get_turf(src))
spawn(0)
var/obj/effect/effect/water/W = PoolOrNew(/obj/effect/effect/water, get_turf(src))
var/turf/my_target
if(a == 1)
my_target = T
@@ -126,7 +126,7 @@
return
reagents.trans_to_obj(W, spray_amount)
W.set_color()
W.set_up(my_target)
W.set_up(my_target)
if((istype(usr.loc, /turf/space)) || (usr.lastarea.has_gravity == 0))
user.inertia_dir = get_dir(target, user)
+1 -3
View File
@@ -147,13 +147,11 @@ var/last_chew = 0
if(istype(I, /obj/item/stack/rods))
var/obj/item/stack/rods/R = I
if (R.use(1))
var/obj/item/weapon/wirerod/W = new /obj/item/weapon/wirerod
var/obj/item/weapon/material/wirerod/W = new(get_turf(user))
user.put_in_hands(W)
user << "<span class='notice'>You wrap the cable restraint around the top of the rod.</span>"
qdel(src)
update_icon(user)
/obj/item/weapon/handcuffs/cyborg
dispenser = 1
@@ -0,0 +1,70 @@
/obj/item/weapon/material/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"
force_divisor = 0.1
thrown_force_divisor = 0.1
/obj/item/weapon/material/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, material.name)
qdel(src)
return
/obj/item/weapon/material/butterflyblade
name = "knife blade"
desc = "A knife blade. Unusable as a weapon without a grip."
icon = 'icons/obj/buildingobject.dmi'
icon_state = "butterfly2"
force_divisor = 0.1
thrown_force_divisor = 0.1
/obj/item/weapon/material/butterflyhandle
name = "concealed knife grip"
desc = "A plasteel grip with screw fittings for a blade."
icon = 'icons/obj/buildingobject.dmi'
icon_state = "butterfly1"
force_divisor = 0.1
thrown_force_divisor = 0.1
/obj/item/weapon/material/butterflyhandle/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/material/butterflyblade))
var/obj/item/weapon/material/butterflyblade/B = W
user << "You attach the two concealed blade parts."
new /obj/item/weapon/material/butterflyconstruction(user.loc, B.material.name)
qdel(W)
qdel(src)
return
/obj/item/weapon/material/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")
force_divisor = 0.1
thrown_force_divisor = 0.1
/obj/item/weapon/material/wirerod/attackby(var/obj/item/I, mob/user as mob)
..()
var/obj/item/finished
if(istype(I, /obj/item/weapon/material/shard))
var/obj/item/weapon/material/tmp_shard = I
finished = new /obj/item/weapon/material/twohanded/spear(get_turf(user), tmp_shard.material.name)
user << "<span class='notice'>You fasten \the [I] to the top of the rod with the cable.</span>"
else if(istype(I, /obj/item/weapon/wirecutters))
finished = new /obj/item/weapon/melee/baton/cattleprod(get_turf(user))
user << "<span class='notice'>You fasten the wirecutters to the top of the rod with the cable, prongs outward.</span>"
if(finished)
user.drop_from_inventory(src)
user.drop_from_inventory(I)
qdel(I)
qdel(src)
user.put_in_hands(finished)
update_icon(user)
-468
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))
@@ -0,0 +1,28 @@
/obj/item/weapon/material/twohanded/baseballbat
name = "bat"
desc = "HOME RUN!"
icon_state = "metalbat0"
base_icon = "metalbat"
item_state = "metalbat"
throwforce = 7
attack_verb = list("smashed", "beaten", "slammed", "smacked", "struck", "battered", "bonked")
hitsound = 'sound/weapons/genhit3.ogg'
default_material = "wood"
force_divisor = 1.1 // 22 when wielded with weight 20 (steel)
unwielded_force_divisor = 0.7 // 15 when unwielded based on above.
//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")
@@ -0,0 +1,114 @@
/obj/item/weapon/material/kitchen
icon = 'icons/obj/kitchen.dmi'
/*
* Utensils
*/
/obj/item/weapon/material/kitchen/utensil
w_class = 1
thrown_force_divisor = 1
origin_tech = "materials=1"
attack_verb = list("attacked", "stabbed", "poked")
sharp = 1
edge = 1
force_divisor = 0.1 // 6 when wielded with hardness 60 (steel)
thrown_force_divisor = 0.25 // 5 when thrown with weight 20 (steel)
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)
M.visible_message("<span class='notice'>\The [user] eats some [loaded] from \the [src].</span>")
else
M.visible_message("<span class='notice'>\The [user] feeds some [loaded] to \the [M] with \the [src].</span>")
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")
edge = 0
sharp = 0
force_divisor = 0.25 //5 when wielded with weight 20 (steel)
/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_divisor = 0.2 // 12 when wielded with hardness 60 (steel)
/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
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
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"
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") //I think the rollingpin attackby will end up ignoring this anyway.
default_material = "wood"
force_divisor = 0.7 // 10 when wielded with weight 15 (wood)
thrown_force_divisor = 1 // as above
/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
return ..()
@@ -0,0 +1,90 @@
/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
attack_verb = list("patted", "tapped")
force_divisor = 0.25 // 15 when wielded with hardness 60 (steel)
thrown_force_divisor = 0.25 // 5 when thrown with weight 20 (steel)
/obj/item/weapon/material/butterfly/update_force()
if(active)
edge = 1
sharp = 1
..() //Updates force.
throwforce = max(3,force-3)
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_divisor = 0.15 // 9 when wielded with hardness 60 (steel)
matter = list(DEFAULT_WALL_MATERIAL = 12000)
origin_tech = "materials=1"
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
unbreakable = 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"
applies_material_colour = 0
/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_divisor = 0.25 // 15 when wielded with hardness 60 (steel)
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
@@ -0,0 +1,104 @@
// SEE code/modules/materials/materials.dm FOR DETAILS ON INHERITED DATUM.
// This class of weapons takes force and appearance data from a material datum.
// They are also fragile based on material data and many can break/smash apart.
/obj/item/weapon/material
health = 10
hitsound = 'sound/weapons/bladeslice.ogg'
gender = NEUTER
throw_speed = 3
throw_range = 7
w_class = 3
sharp = 0
edge = 0
var/applies_material_colour = 1
var/unbreakable
var/force_divisor = 0.5
var/thrown_force_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()
if(edge || sharp)
force = material.get_edge_damage()
else
force = material.get_blunt_damage()
force = round(force*force_divisor)
throwforce = round(material.get_blunt_damage()*thrown_force_divisor)
//spawn(1)
// world << "[src] has force [force] and throwforce [throwforce] when made from default material [material.name]"
/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] [initial(name)]"
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(material.is_brittle())
health = 0
else if(!prob(material.hardness))
health--
check_health()
/obj/item/weapon/material/proc/check_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] [material.destruction_desc]!</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)
/obj/item/weapon/material/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > material.ignition_point)
TemperatureAct(exposed_temperature)
// This might need adjustment. Will work that out later.
/obj/item/weapon/material/proc/TemperatureAct(temperature)
if(temperature > material.ignition_point)
for(var/turf/simulated/floor/target_tile in range(2,loc))
var/phoronToDeduce = temperature/30
target_tile.assume_gas("phoron", phoronToDeduce, 200+T0C)
spawn (0) target_tile.hotspot_expose(temperature, 400)
health -= phoronToDeduce/100
check_health()
/obj/item/weapon/material/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(material.ignition_point && WT.remove_fuel(0, user))
TemperatureAct(150)
else
return ..()
@@ -0,0 +1,67 @@
/obj/item/weapon/material/harpoon
name = "harpoon"
sharp = 1
edge = 1
desc = "Tharr she blows!"
icon_state = "harpoon"
item_state = "harpoon"
force_divisor = 0.3 // 18 with hardness 60 (steel)
attack_verb = list("jabbed","stabbed","ripped")
/obj/item/weapon/material/hatchet
name = "hatchet"
desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood."
icon = 'icons/obj/weapons.dmi'
icon_state = "hatchet"
force_divisor = 0.2 // 12 with hardness 60 (steel)
thrown_force_divisor = 0.75 // 15 with weight 20 (steel)
w_class = 2
sharp = 1
edge = 1
origin_tech = "materials=2;combat=1"
attack_verb = list("chopped", "torn", "cut")
applies_material_colour = 0
/obj/item/weapon/material/hatchet/unathiknife
name = "duelling knife"
desc = "A length of leather-bound wood studded with razor-sharp teeth. How crude."
icon = 'icons/obj/weapons.dmi'
icon_state = "unathiknife"
attack_verb = list("ripped", "torn", "cut")
/obj/item/weapon/material/hatchet/tacknife
name = "tactical knife"
desc = "You'd be killing loads of people if this was Medal of Valor: Heroes of Nyx."
icon = 'icons/obj/weapons.dmi'
icon_state = "tacknife"
item_state = "knife"
attack_verb = list("stabbed", "chopped", "cut")
applies_material_colour = 1
/obj/item/weapon/material/minihoe // -- Numbers
name = "mini hoe"
desc = "It's used for removing weeds or scratching your back."
icon = 'icons/obj/weapons.dmi'
icon_state = "hoe"
item_state = "hoe"
flags = CONDUCT | NOBLUDGEON
force_divisor = 0.25 // 5 with weight 20 (steel)
thrown_force_divisor = 0.25 // as above
w_class = 2
attack_verb = list("slashed", "sliced", "cut", "clawed")
/obj/item/weapon/material/scythe
icon_state = "scythe0"
name = "scythe"
desc = "A sharp and curved blade on a long fibremetal handle, this tool makes it easy to reap what you sow."
force_divisor = 0.275 // 16 with hardness 60 (steel)
thrown_force_divisor = 0.25 // 5 with weight 20 (steel)
sharp = 1
edge = 1
throw_speed = 1
throw_range = 3
w_class = 4
flags = NOSHIELD
slot_flags = SLOT_BACK
origin_tech = "materials=2;combat=2"
attack_verb = list("chopped", "sliced", "cut", "reaped")
@@ -0,0 +1,89 @@
// Glass shards
/obj/item/weapon/material/shard
name = "shard"
icon = 'icons/obj/shards.dmi'
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)
icon_state = "large"
sharp = 1
edge = 1
w_class = 2
force_divisor = 0.2 // 6 with hardness 30 (glass)
thrown_force_divisor = 0.4 // 4 with weight 15 (glass)
item_state = "shard-glass"
attack_verb = list("stabbed", "slashed", "sliced", "cut")
default_material = "glass"
unbreakable = 1 //It's already broken.
/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")
@@ -0,0 +1,30 @@
/obj/item/weapon/material/sword
name = "claymore"
desc = "What are you standing around staring at this for? Get to killing!"
icon_state = "claymore"
item_state = "claymore"
slot_flags = SLOT_BELT
force_divisor = 0.7 // 42 when wielded with hardnes 60 (steel)
thrown_force_divisor = 0.5 // 10 when thrown with weight 20 (steel)
sharp = 1
edge = 1
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
/obj/item/weapon/material/sword/IsShield()
return 1
/obj/item/weapon/material/sword/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/sword/katana
name = "katana"
desc = "Woefully underpowered in D20. This one looks pretty sharp."
icon_state = "katana"
item_state = "katana"
slot_flags = SLOT_BELT | SLOT_BACK
/obj/item/weapon/material/sword/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)
@@ -0,0 +1,24 @@
/obj/item/weapon/material/star
name = "shuriken"
desc = "A sharp, perfectly weighted piece of metal."
icon_state = "star"
force_divisor = 0.1 // 6 with hardness 60 (steel)
thrown_force_divisor = 0.75 // 15 with weight 20 (steel)
throw_speed = 10
throw_range = 15
sharp = 1
edge = 1
/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"
@@ -16,53 +16,69 @@
/*
* Twohanded
*/
/obj/item/weapon/twohanded
/obj/item/weapon/material/twohanded
w_class = 4
var/wielded = 0
var/force_wielded = 0
var/force_unwielded
var/wieldsound = null
var/unwieldsound = null
var/base_icon
var/base_name
var/unwielded_force_divisor = 0.25
/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
if(sharp || edge)
force_wielded = material.get_edge_damage()
else
force_wielded = material.get_blunt_damage()
force_wielded = round(force_wielded*force_divisor)
force_unwielded = round(force_wielded*unwielded_force_divisor)
force = force_unwielded
throwforce = round(force*thrown_force_divisor)
//world << "[src] has unwielded force [force_unwielded], wielded force [force_wielded] and throwforce [throwforce] when made from default material [material.name]"
/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 +96,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 +105,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,37 +122,40 @@
return
///////////OFFHAND///////////////
/obj/item/weapon/twohanded/offhand
w_class = 5.0
/obj/item/weapon/material/twohanded/offhand
w_class = 5
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"
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
force = 15
unwielded_force_divisor = 0.25
force_divisor = 0.7 // 10/42 with hardness 60 (steel) and 0.25 unwielded divisor
sharp = 1
edge = 1
w_class = 4.0
slot_flags = SLOT_BACK
force_wielded = 30
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
applies_material_colour = 0
/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)
@@ -149,11 +168,13 @@
var/obj/effect/plant/P = A
P.die_off()
qdel(A)
/*
/*
* Double-Bladed Energy Swords - Cheridan
*/
/obj/item/weapon/twohanded/dualsaber
// Not sure what to do with this one, it won't work nicely with the material system,
// but I don't want to copypaste all the twohanded procs..
/obj/item/weapon/material/twohanded/dualsaber
icon_state = "dualsaber0"
base_icon = "dualsaber"
name = "double-bladed energy sword"
@@ -171,8 +192,9 @@
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
sharp = 1
edge = 1
applies_material_colour = 0
/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]."
@@ -184,14 +206,15 @@
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"
@@ -199,38 +222,13 @@
force = 10
w_class = 4.0
slot_flags = SLOT_BACK
force_wielded = 22 // Was 13, Buffed - RR
throwforce = 20
force_wielded = 0.75 // 22 when wielded with hardness 15 (glass)
unwielded_force_divisor = 0.65 // 14 when unwielded based on above
thrown_force_divisor = 1.5 // 20 when thrown with weight 15 (glass)
throw_speed = 3
edge = 0
edge = 1
sharp = 1
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"
@@ -0,0 +1,234 @@
/* Two-handed Weapons
* Contains:
* Twohanded
* Fireaxe
* Double-Bladed Energy Swords
*/
/*##################################################################
##################### TWO HANDED WEAPONS BE HERE~ -Agouri :3 ########
####################################################################*/
//Rewrote TwoHanded weapons stuff and put it all here. Just copypasta fireaxe to make new ones ~Carn
//This rewrite means we don't have two variables for EVERY item which are used only by a few weapons.
//It also tidies stuff up elsewhere.
/*
* Twohanded
*/
/obj/item/weapon/material/twohanded
w_class = 4
var/wielded = 0
var/force_wielded = 0
var/force_unwielded
var/wieldsound = null
var/unwieldsound = null
var/base_icon
var/base_name
var/unwielded_force_divisor = 0.25
/obj/item/weapon/material/twohanded/proc/unwield()
wielded = 0
force = force_unwielded
name = "[base_name]"
update_icon()
/obj/item/weapon/material/twohanded/proc/wield()
wielded = 1
force = force_wielded
name = "[base_name] (Wielded)"
update_icon()
/obj/item/weapon/material/twohanded/update_force()
base_name = name
if(sharp || edge)
force_wielded = material.get_edge_damage()
else
force_wielded = material.get_blunt_damage()
force_wielded = round(force_wielded*force_divisor)
force_unwielded = round(force_wielded*unwielded_force_divisor)
force = force_unwielded
throwforce = round(force*thrown_force_divisor)
//world << "[src] has unwielded force [force_unwielded], wielded force [force_wielded] and throwforce [throwforce] when made from default material [material.name]"
/obj/item/weapon/material/twohanded/New()
..()
update_icon()
/obj/item/weapon/material/twohanded/mob_can_equip(M as mob, slot)
//Cannot equip wielded items.
if(wielded)
M << "<span class='warning'>Unwield the [base_name] first!</span>"
return 0
return ..()
/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/material/twohanded/O = user.get_inactive_hand()
if(istype(O))
O.unwield()
return unwield()
/obj/item/weapon/material/twohanded/update_icon()
icon_state = "[base_icon][wielded]"
item_state = icon_state
/obj/item/weapon/material/twohanded/pickup(mob/user)
unwield()
/obj/item/weapon/material/twohanded/attack_self(mob/user as mob)
..()
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(H.species.is_small)
user << "<span class='warning'>It's too heavy for you to wield fully.</span>"
return
else
return
if(wielded) //Trying to unwield it
unwield()
user << "<span class='notice'>You are now carrying the [name] with one hand.</span>"
if (src.unwieldsound)
playsound(src.loc, unwieldsound, 50, 1)
var/obj/item/weapon/material/twohanded/offhand/O = user.get_inactive_hand()
if(O && istype(O))
O.unwield()
else //Trying to wield it
if(user.get_inactive_hand())
user << "<span class='warning'>You need your other hand to be empty</span>"
return
wield()
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/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))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
return
///////////OFFHAND///////////////
/obj/item/weapon/material/twohanded/offhand
w_class = 5
icon_state = "offhand"
name = "offhand"
default_material = "placeholder"
/obj/item/weapon/material/twohanded/offhand/unwield()
qdel(src)
/obj/item/weapon/material/twohanded/offhand/wield()
qdel(src)
/obj/item/weapon/material/twohanded/offhand/update_icon()
return
/*
* Fireaxe
*/
/obj/item/weapon/material/twohanded/fireaxe // DEM AXES MAN, marker -Agouri
icon_state = "fireaxe0"
base_icon = "fireaxe"
name = "fire axe"
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
unwielded_force_divisor = 0.25
force_divisor = 0.7 // 10/42 with hardness 60 (steel) and 0.25 unwielded divisor
sharp = 1
edge = 1
slot_flags = SLOT_BACK
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
applies_material_colour = 0
/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)
if(istype(A,/obj/structure/window))
var/obj/structure/window/W = A
W.shatter()
<<<<<<< HEAD:code/game/objects/items/weapons/material/twohanded.dm
/*
=======
else if(istype(A,/obj/structure/grille))
qdel(A)
else if(istype(A,/obj/effect/plant))
var/obj/effect/plant/P = A
P.die_off()
qdel(A)
>>>>>>> 284d1cc1f5c67503fe0da89ce01985d73bb02038:code/game/objects/items/weapons/twohanded.dm
/*
* Double-Bladed Energy Swords - Cheridan
*/
// Not sure what to do with this one, it won't work nicely with the material system,
// but I don't want to copypaste all the twohanded procs..
/obj/item/weapon/material/twohanded/dualsaber
icon_state = "dualsaber0"
base_icon = "dualsaber"
name = "double-bladed energy sword"
desc = "Handle with care."
force = 3
throwforce = 5.0
throw_speed = 1
throw_range = 5
w_class = 2.0
force_wielded = 30
wieldsound = 'sound/weapons/saberon.ogg'
unwieldsound = 'sound/weapons/saberoff.ogg'
flags = NOSHIELD
origin_tech = "magnets=3;syndicate=4"
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
sharp = 1
edge = 1
applies_material_colour = 0
/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]."
user.take_organ_damage(20,25)
return
if((wielded) && prob(50))
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2))
user.set_dir(i)
sleep(1)
/obj/item/weapon/material/twohanded/dualsaber/IsShield()
if(wielded)
return 1
else
return 0
*/
//spears, bay edition
/obj/item/weapon/material/twohanded/spear
icon_state = "spearglass0"
base_icon = "spearglass"
name = "spear"
desc = "A haphazardly-constructed yet still deadly weapon of ancient design."
slot_flags = SLOT_BACK
force_wielded = 0.75 // 22 when wielded with hardness 15 (glass)
unwielded_force_divisor = 0.65 // 14 when unwielded based on above
thrown_force_divisor = 1.5 // 20 when thrown with weight 15 (glass)
throw_speed = 3
edge = 1
sharp = 1
flags = NOSHIELD
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
default_material = "glass"
@@ -105,8 +105,11 @@
name = "infinite-capacity power cell!"
icon_state = "icell"
origin_tech = null
maxcharge = 30000
maxcharge = 30000 //determines how badly mobs get shocked
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 80)
check_charge()
return 1
use()
return 1
-120
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"))
+10 -10
View File
@@ -119,12 +119,12 @@
//verbs += /obj/item/weapon/storage/bag/sheetsnatcher/quick_empty
can_be_inserted(obj/item/W as obj, stop_messages = 0)
if(!istype(W,/obj/item/stack/sheet) || istype(W,/obj/item/stack/sheet/mineral/sandstone) || istype(W,/obj/item/stack/sheet/wood))
if(!istype(W,/obj/item/stack/material) || istype(W,/obj/item/stack/material/sandstone) || istype(W,/obj/item/stack/material/wood))
if(!stop_messages)
usr << "The snatcher does not accept [W]."
return 0 //I don't care, but the existing code rejects them for not being "sheets" *shrug* -Sayu
var/current = 0
for(var/obj/item/stack/sheet/S in contents)
for(var/obj/item/stack/material/S in contents)
current += S.amount
if(capacity == current)//If it's full, you're done
if(!stop_messages)
@@ -135,20 +135,20 @@
// Modified handle_item_insertion. Would prefer not to, but...
handle_item_insertion(obj/item/W as obj, prevent_warning = 0)
var/obj/item/stack/sheet/S = W
var/obj/item/stack/material/S = W
if(!istype(S)) return 0
var/amount
var/inserted = 0
var/current = 0
for(var/obj/item/stack/sheet/S2 in contents)
for(var/obj/item/stack/material/S2 in contents)
current += S2.amount
if(capacity < current + S.amount)//If the stack will fill it up
amount = capacity - current
else
amount = S.amount
for(var/obj/item/stack/sheet/sheet in contents)
for(var/obj/item/stack/material/sheet in contents)
if(S.type == sheet.type) // we are violating the amount limitation because these are not sane objects
sheet.amount += amount // they should only be removed through procs in this file, which split them up.
S.amount -= amount
@@ -183,7 +183,7 @@
if(display_contents_with_number)
numbered_contents = list()
adjusted_contents = 0
for(var/obj/item/stack/sheet/I in contents)
for(var/obj/item/stack/material/I in contents)
adjusted_contents++
var/datum/numbered_display/D = new/datum/numbered_display(I)
D.number = I.amount
@@ -200,9 +200,9 @@
// Modified quick_empty verb drops appropriate sized stacks
quick_empty()
var/location = get_turf(src)
for(var/obj/item/stack/sheet/S in contents)
for(var/obj/item/stack/material/S in contents)
while(S.amount)
var/obj/item/stack/sheet/N = new S.type(location)
var/obj/item/stack/material/N = new S.type(location)
var/stacksize = min(S.amount,N.max_amount)
N.amount = stacksize
S.amount -= stacksize
@@ -215,7 +215,7 @@
// Instead of removing
remove_from_storage(obj/item/W as obj, atom/new_location)
var/obj/item/stack/sheet/S = W
var/obj/item/stack/material/S = W
if(!istype(S)) return 0
//I would prefer to drop a new stack, but the item/attack_hand code
@@ -224,7 +224,7 @@
// -Sayu
if(S.amount > S.max_amount)
var/obj/item/stack/sheet/temp = new S.type(src)
var/obj/item/stack/material/temp = new S.type(src)
temp.amount = S.amount - S.max_amount
S.amount = S.max_amount
@@ -33,8 +33,8 @@
/obj/item/device/analyzer,
/obj/item/taperoll/engineering,
/obj/item/device/robotanalyzer,
/obj/item/weapon/minihoe,
/obj/item/weapon/hatchet,
/obj/item/weapon/material/minihoe,
/obj/item/weapon/material/hatchet,
/obj/item/device/analyzer/plant_analyzer,
/obj/item/weapon/extinguisher/mini
)
@@ -598,7 +598,7 @@
icon_state = "light"
desc = "This box is shaped on the inside so that only light tubes and bulbs fit."
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
foldable = /obj/item/stack/material/cardboard //BubbleWrap
storage_slots=21
can_hold = list(/obj/item/weapon/light/tube, /obj/item/weapon/light/bulb)
max_storage_space = 42 //holds 21 items of w_class 2
@@ -18,7 +18,7 @@
storage_slots = 6
var/startswith = 6
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/donut)
foldable = /obj/item/stack/sheet/cardboard
foldable = /obj/item/stack/material/cardboard
/obj/item/weapon/storage/box/donut/New()
..()
+2 -1
View File
@@ -35,12 +35,13 @@
/obj/item/weapon/melee/baton/proc/deductcharge(var/chrgdeductamt)
if(bcell)
if(bcell.use(chrgdeductamt))
if(bcell.checked_use(chrgdeductamt))
return 1
else
status = 0
update_icon()
return 0
return null
/obj/item/weapon/melee/baton/update_icon()
if(status)
+3 -3
View File
@@ -455,9 +455,9 @@
/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/hatchet
/obj/item/weapon/material/kitchen/utensil/knife,
/obj/item/weapon/material/kitchen/utensil/fork,
/obj/item/weapon/material/hatchet
)
var/list/tools = list()
var/current_tool = 1
+208
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))
-209
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."