mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 10:34:10 +01:00
Moves material stacks to modules/materials
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
// Stacked resources. They use a material datum for a lot of inherited values.
|
||||
// If you're adding something here, make sure to add it to fifty_spawner_mats.dm as well
|
||||
/obj/item/stack/material
|
||||
force = 5.0
|
||||
throwforce = 5
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
center_of_mass = null
|
||||
max_amount = 50
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/items/lefthand_material.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/righthand_material.dmi',
|
||||
)
|
||||
|
||||
var/default_type = DEFAULT_WALL_MATERIAL
|
||||
var/datum/material/material
|
||||
var/perunit = SHEET_MATERIAL_AMOUNT
|
||||
var/apply_colour //temp pending icon rewrite
|
||||
drop_sound = 'sound/items/drop/axe.ogg'
|
||||
pickup_sound = 'sound/items/pickup/axe.ogg'
|
||||
|
||||
/obj/item/stack/material/Initialize()
|
||||
. = ..()
|
||||
|
||||
randpixel_xy()
|
||||
|
||||
if(!default_type)
|
||||
default_type = DEFAULT_WALL_MATERIAL
|
||||
material = get_material_by_name("[default_type]")
|
||||
if(!material)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
recipes = material.get_recipes()
|
||||
stacktype = material.stack_type
|
||||
if(islist(material.stack_origin_tech))
|
||||
origin_tech = material.stack_origin_tech.Copy()
|
||||
|
||||
if(apply_colour)
|
||||
color = material.icon_colour
|
||||
|
||||
if(!material.conductive)
|
||||
flags |= NOCONDUCT
|
||||
|
||||
matter = material.get_matter()
|
||||
update_strings()
|
||||
|
||||
/obj/item/stack/material/get_material()
|
||||
return material
|
||||
|
||||
/obj/item/stack/material/proc/update_strings()
|
||||
// Update from material datum.
|
||||
singular_name = material.sheet_singular_name
|
||||
|
||||
if(amount>1)
|
||||
name = "[material.use_name] [material.sheet_plural_name]"
|
||||
desc = "A stack of [material.use_name] [material.sheet_plural_name]."
|
||||
gender = PLURAL
|
||||
else
|
||||
name = "[material.use_name] [material.sheet_singular_name]"
|
||||
desc = "A [material.sheet_singular_name] of [material.use_name]."
|
||||
gender = NEUTER
|
||||
|
||||
/obj/item/stack/material/use(var/used)
|
||||
. = ..()
|
||||
update_strings()
|
||||
return
|
||||
|
||||
/obj/item/stack/material/transfer_to(obj/item/stack/S, var/tamount=null, var/type_verified)
|
||||
var/obj/item/stack/material/M = S
|
||||
if(!istype(M) || material.name != M.material.name)
|
||||
return 0
|
||||
var/transfer = ..(S,tamount,1)
|
||||
if(src) update_strings()
|
||||
if(M) M.update_strings()
|
||||
return transfer
|
||||
|
||||
/obj/item/stack/material/attack_self(var/mob/user)
|
||||
if(!material.build_windows(user, src))
|
||||
..()
|
||||
|
||||
/obj/item/stack/material/attackby(var/obj/item/W, var/mob/user)
|
||||
if(istype(W,/obj/item/stack/cable_coil))
|
||||
material.build_wired_product(user, W, src)
|
||||
return
|
||||
else if(istype(W, /obj/item/stack/rods))
|
||||
material.build_rod_product(user, W, src)
|
||||
return
|
||||
return ..()
|
||||
@@ -0,0 +1,66 @@
|
||||
/obj/item/stack/material/phoron
|
||||
name = "solid phoron"
|
||||
icon_state = "sheet-phoron"
|
||||
default_type = "phoron"
|
||||
no_variants = FALSE
|
||||
drop_sound = 'sound/items/drop/glass.ogg'
|
||||
pickup_sound = 'sound/items/pickup/glass.ogg'
|
||||
|
||||
/obj/item/stack/material/diamond
|
||||
name = "diamond"
|
||||
icon_state = "sheet-diamond"
|
||||
default_type = "diamond"
|
||||
drop_sound = 'sound/items/drop/glass.ogg'
|
||||
pickup_sound = 'sound/items/pickup/glass.ogg'
|
||||
|
||||
/obj/item/stack/material/painite
|
||||
name = "painite"
|
||||
icon_state = "sheet-gem"
|
||||
singular_name = "painite gem"
|
||||
default_type = "painite"
|
||||
apply_colour = 1
|
||||
no_variants = FALSE
|
||||
|
||||
/obj/item/stack/material/void_opal
|
||||
name = "void opal"
|
||||
icon_state = "sheet-void_opal"
|
||||
singular_name = "void opal"
|
||||
default_type = "void opal"
|
||||
apply_colour = 1
|
||||
no_variants = FALSE
|
||||
|
||||
/obj/item/stack/material/quartz
|
||||
name = "quartz"
|
||||
icon_state = "sheet-gem"
|
||||
singular_name = "quartz gem"
|
||||
default_type = "quartz"
|
||||
apply_colour = 1
|
||||
no_variants = FALSE
|
||||
|
||||
/obj/item/stack/material/valhollide
|
||||
name = MAT_VALHOLLIDE
|
||||
icon_state = "sheet-gem"
|
||||
item_state = "diamond"
|
||||
default_type = MAT_VALHOLLIDE
|
||||
no_variants = FALSE
|
||||
apply_colour = TRUE
|
||||
|
||||
// Particle Smasher and Exotic material.
|
||||
/obj/item/stack/material/verdantium
|
||||
name = MAT_VERDANTIUM
|
||||
icon_state = "sheet-wavy"
|
||||
item_state = "mhydrogen"
|
||||
default_type = MAT_VERDANTIUM
|
||||
no_variants = FALSE
|
||||
apply_colour = TRUE
|
||||
|
||||
/obj/item/stack/material/morphium
|
||||
name = MAT_MORPHIUM
|
||||
icon_state = "sheet-wavy"
|
||||
item_state = "mhydrogen"
|
||||
default_type = MAT_MORPHIUM
|
||||
no_variants = FALSE
|
||||
apply_colour = TRUE
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/obj/item/stack/material/glass
|
||||
name = "glass"
|
||||
icon_state = "sheet-transparent"
|
||||
default_type = "glass"
|
||||
no_variants = FALSE
|
||||
drop_sound = 'sound/items/drop/glass.ogg'
|
||||
pickup_sound = 'sound/items/pickup/glass.ogg'
|
||||
apply_colour = TRUE
|
||||
|
||||
/obj/item/stack/material/glass/reinforced
|
||||
name = "reinforced glass"
|
||||
icon_state = "sheet-rtransparent"
|
||||
default_type = "rglass"
|
||||
no_variants = FALSE
|
||||
apply_colour = TRUE
|
||||
|
||||
/obj/item/stack/material/glass/phoronglass
|
||||
name = "borosilicate glass"
|
||||
desc = "This sheet is special platinum-glass alloy designed to withstand large temperatures"
|
||||
singular_name = "borosilicate glass sheet"
|
||||
icon_state = "sheet-transparent"
|
||||
default_type = "borosilicate glass"
|
||||
no_variants = FALSE
|
||||
apply_colour = TRUE
|
||||
|
||||
/obj/item/stack/material/glass/phoronrglass
|
||||
name = "reinforced borosilicate glass"
|
||||
desc = "This sheet is special platinum-glass alloy designed to withstand large temperatures. It is reinforced with few rods."
|
||||
singular_name = "reinforced borosilicate glass sheet"
|
||||
icon_state = "sheet-rtransparent"
|
||||
default_type = "reinforced borosilicate glass"
|
||||
no_variants = FALSE
|
||||
apply_colour = TRUE
|
||||
@@ -0,0 +1,18 @@
|
||||
/obj/item/stack/material/steel/hull
|
||||
name = MAT_STEELHULL
|
||||
default_type = MAT_STEELHULL
|
||||
|
||||
/obj/item/stack/material/plasteel/hull
|
||||
name = MAT_PLASTEELHULL
|
||||
default_type = MAT_PLASTEELHULL
|
||||
|
||||
/obj/item/stack/material/durasteel/hull
|
||||
name = MAT_DURASTEELHULL
|
||||
|
||||
/obj/item/stack/material/titanium/hull
|
||||
name = MAT_TITANIUMHULL
|
||||
default_type = MAT_TITANIUMHULL
|
||||
|
||||
/obj/item/stack/material/morphium/hull
|
||||
name = MAT_MORPHIUMHULL
|
||||
default_type = MAT_MORPHIUMHULL
|
||||
@@ -0,0 +1,140 @@
|
||||
/obj/item/stack/material/steel
|
||||
name = DEFAULT_WALL_MATERIAL
|
||||
icon_state = "sheet-refined"
|
||||
default_type = DEFAULT_WALL_MATERIAL
|
||||
no_variants = FALSE
|
||||
apply_colour = TRUE
|
||||
|
||||
/obj/item/stack/material/plasteel
|
||||
name = "plasteel"
|
||||
icon_state = "sheet-reinforced"
|
||||
default_type = "plasteel"
|
||||
no_variants = FALSE
|
||||
apply_colour = TRUE
|
||||
|
||||
/obj/item/stack/material/durasteel
|
||||
name = "durasteel"
|
||||
icon_state = "sheet-reinforced"
|
||||
item_state = "sheet-metal"
|
||||
default_type = "durasteel"
|
||||
no_variants = FALSE
|
||||
apply_colour = TRUE
|
||||
|
||||
/obj/item/stack/material/titanium
|
||||
name = MAT_TITANIUM
|
||||
icon_state = "sheet-refined"
|
||||
apply_colour = TRUE
|
||||
item_state = "sheet-silver"
|
||||
default_type = MAT_TITANIUM
|
||||
no_variants = FALSE
|
||||
|
||||
/obj/item/stack/material/iron
|
||||
name = "iron"
|
||||
icon_state = "sheet-ingot"
|
||||
default_type = "iron"
|
||||
apply_colour = 1
|
||||
no_variants = FALSE
|
||||
|
||||
/obj/item/stack/material/lead
|
||||
name = "lead"
|
||||
icon_state = "sheet-ingot"
|
||||
default_type = "lead"
|
||||
apply_colour = 1
|
||||
no_variants = FALSE
|
||||
|
||||
/obj/item/stack/material/gold
|
||||
name = "gold"
|
||||
icon_state = "sheet-ingot"
|
||||
default_type = "gold"
|
||||
no_variants = FALSE
|
||||
apply_colour = TRUE
|
||||
|
||||
/obj/item/stack/material/silver
|
||||
name = "silver"
|
||||
icon_state = "sheet-ingot"
|
||||
default_type = "silver"
|
||||
no_variants = FALSE
|
||||
apply_colour = TRUE
|
||||
|
||||
//Valuable resource, cargo can sell it.
|
||||
/obj/item/stack/material/platinum
|
||||
name = "platinum"
|
||||
icon_state = "sheet-adamantine"
|
||||
default_type = "platinum"
|
||||
no_variants = FALSE
|
||||
apply_colour = TRUE
|
||||
|
||||
/obj/item/stack/material/uranium
|
||||
name = "uranium"
|
||||
icon_state = "sheet-uranium"
|
||||
default_type = "uranium"
|
||||
no_variants = FALSE
|
||||
|
||||
//Extremely valuable to Research.
|
||||
/obj/item/stack/material/mhydrogen
|
||||
name = "metallic hydrogen"
|
||||
icon_state = "sheet-mythril"
|
||||
default_type = "mhydrogen"
|
||||
no_variants = FALSE
|
||||
|
||||
// Fusion fuel.
|
||||
/obj/item/stack/material/deuterium
|
||||
name = "deuterium"
|
||||
icon_state = "sheet-puck"
|
||||
default_type = "deuterium"
|
||||
apply_colour = 1
|
||||
no_variants = FALSE
|
||||
|
||||
//Fuel for MRSPACMAN generator.
|
||||
/obj/item/stack/material/tritium
|
||||
name = "tritium"
|
||||
icon_state = "sheet-puck"
|
||||
default_type = "tritium"
|
||||
apply_colour = TRUE
|
||||
no_variants = FALSE
|
||||
|
||||
/obj/item/stack/material/osmium
|
||||
name = "osmium"
|
||||
icon_state = "sheet-ingot"
|
||||
default_type = "osmium"
|
||||
apply_colour = 1
|
||||
no_variants = FALSE
|
||||
|
||||
/obj/item/stack/material/graphite
|
||||
name = "graphite"
|
||||
icon_state = "sheet-puck"
|
||||
default_type = MAT_GRAPHITE
|
||||
apply_colour = 1
|
||||
no_variants = FALSE
|
||||
|
||||
/obj/item/stack/material/bronze
|
||||
name = "bronze"
|
||||
icon_state = "sheet-ingot"
|
||||
singular_name = "bronze ingot"
|
||||
default_type = "bronze"
|
||||
apply_colour = 1
|
||||
no_variants = FALSE
|
||||
|
||||
/obj/item/stack/material/tin
|
||||
name = "tin"
|
||||
icon_state = "sheet-ingot"
|
||||
singular_name = "tin ingot"
|
||||
default_type = "tin"
|
||||
apply_colour = 1
|
||||
no_variants = FALSE
|
||||
|
||||
/obj/item/stack/material/copper
|
||||
name = "copper"
|
||||
icon_state = "sheet-ingot"
|
||||
singular_name = "copper ingot"
|
||||
default_type = "copper"
|
||||
apply_colour = 1
|
||||
no_variants = FALSE
|
||||
|
||||
/obj/item/stack/material/aluminium
|
||||
name = "aluminium"
|
||||
icon_state = "sheet-ingot"
|
||||
singular_name = "aluminium ingot"
|
||||
default_type = "aluminium"
|
||||
apply_colour = 1
|
||||
no_variants = FALSE
|
||||
@@ -0,0 +1,109 @@
|
||||
/obj/item/stack/rods
|
||||
name = "metal rod"
|
||||
desc = "Some rods. Can be used for building, or something."
|
||||
singular_name = "metal rod"
|
||||
icon_state = "rods"
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
force = 9.0
|
||||
throwforce = 15.0
|
||||
throw_speed = 5
|
||||
throw_range = 20
|
||||
drop_sound = 'sound/items/drop/metalweapon.ogg'
|
||||
pickup_sound = 'sound/items/pickup/metalweapon.ogg'
|
||||
matter = list(DEFAULT_WALL_MATERIAL = SHEET_MATERIAL_AMOUNT / 2)
|
||||
max_amount = 60
|
||||
attack_verb = list("hit", "bludgeoned", "whacked")
|
||||
|
||||
color = "#666666"
|
||||
|
||||
/obj/item/stack/rods/cyborg
|
||||
name = "metal rod synthesizer"
|
||||
desc = "A device that makes metal rods."
|
||||
gender = NEUTER
|
||||
matter = null
|
||||
uses_charge = 1
|
||||
charge_costs = list(500)
|
||||
stacktype = /obj/item/stack/rods
|
||||
no_variants = TRUE
|
||||
|
||||
/obj/item/stack/rods/Initialize()
|
||||
. = ..()
|
||||
recipes = rods_recipes
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/rods/update_icon()
|
||||
var/amount = get_amount()
|
||||
if((amount <= 5) && (amount > 0))
|
||||
icon_state = "rods-[amount]"
|
||||
else
|
||||
icon_state = "rods"
|
||||
|
||||
var/global/list/datum/stack_recipe/rods_recipes = list( \
|
||||
new/datum/stack_recipe("grille", /obj/structure/grille, 2, time = 10, one_per_turf = 1, on_floor = 0),
|
||||
new/datum/stack_recipe("catwalk", /obj/structure/catwalk, 2, time = 80, one_per_turf = 1, on_floor = 1))
|
||||
|
||||
/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
|
||||
if(get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two rods to do this.</span>")
|
||||
return
|
||||
|
||||
if(WT.remove_fuel(0,user))
|
||||
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("<span class='notice'>[src] is shaped into metal by [user.name] with the weldingtool.</span>", 3, "<span class='notice'>You hear welding.</span>", 2)
|
||||
var/obj/item/stack/rods/R = src
|
||||
src = null
|
||||
var/replace = (user.get_inactive_hand()==R)
|
||||
R.use(2)
|
||||
if (!R && replace)
|
||||
user.put_in_hands(new_item)
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/tape_roll))
|
||||
var/obj/item/stack/medical/splint/ghetto/new_splint = new(get_turf(user))
|
||||
new_splint.add_fingerprint(user)
|
||||
|
||||
user.visible_message("<span class='notice'>\The [user] constructs \a [new_splint] out of a [singular_name].</span>", \
|
||||
"<span class='notice'>You use make \a [new_splint] out of a [singular_name].</span>")
|
||||
src.use(1)
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/*
|
||||
/obj/item/stack/rods/attack_self(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if(!istype(user.loc,/turf)) return 0
|
||||
|
||||
if (locate(/obj/structure/grille, usr.loc))
|
||||
for(var/obj/structure/grille/G in usr.loc)
|
||||
if (G.destroyed)
|
||||
G.health = 10
|
||||
G.density = 1
|
||||
G.destroyed = 0
|
||||
G.icon_state = "grille"
|
||||
use(1)
|
||||
else
|
||||
return 1
|
||||
|
||||
else if(!in_use)
|
||||
if(get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two rods to do this.</span>")
|
||||
return
|
||||
to_chat(usr, "<span class='notice'>Assembling grille...</span>")
|
||||
in_use = 1
|
||||
if (!do_after(usr, 10))
|
||||
in_use = 0
|
||||
return
|
||||
var/obj/structure/grille/F = new /obj/structure/grille/ ( usr.loc )
|
||||
to_chat(usr, "<span class='notice'>You assemble a grille</span>")
|
||||
in_use = 0
|
||||
F.add_fingerprint(usr)
|
||||
use(2)
|
||||
return
|
||||
*/
|
||||
@@ -0,0 +1,31 @@
|
||||
/obj/item/stack/material/chitin
|
||||
name = "chitin"
|
||||
desc = "The by-product of mob grinding."
|
||||
icon_state = "chitin"
|
||||
default_type = MAT_CHITIN
|
||||
no_variants = FALSE
|
||||
pass_color = TRUE
|
||||
strict_color_stacking = TRUE
|
||||
drop_sound = 'sound/items/drop/leather.ogg'
|
||||
pickup_sound = 'sound/items/pickup/leather.ogg'
|
||||
|
||||
//don't see anywhere else to put these, maybe together they could be used to make the xenos suit?
|
||||
/obj/item/stack/xenochitin
|
||||
name = "alien chitin"
|
||||
desc = "A piece of the hide of a terrible creature."
|
||||
singular_name = "alien chitin piece"
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "chitin"
|
||||
stacktype = "hide-chitin"
|
||||
|
||||
/obj/item/xenos_claw
|
||||
name = "alien claw"
|
||||
desc = "The claw of a terrible creature."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "claw"
|
||||
|
||||
/obj/item/weed_extract
|
||||
name = "weed extract"
|
||||
desc = "A piece of slimy, purplish weed."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "weed_extract"
|
||||
@@ -0,0 +1,8 @@
|
||||
/obj/item/stack/material/resin
|
||||
name = "resin"
|
||||
icon_state = "sheet-resin"
|
||||
default_type = "resin"
|
||||
no_variants = TRUE
|
||||
apply_colour = TRUE
|
||||
pass_color = TRUE
|
||||
strict_color_stacking = TRUE
|
||||
@@ -0,0 +1,90 @@
|
||||
/obj/item/stack/animalhide
|
||||
name = "hide"
|
||||
desc = "The hide of some creature."
|
||||
description_info = "Use something <b><font color='red'>sharp</font></b>, like a knife, to scrape the hairs/feathers/etc off this hide to prepare it for tanning."
|
||||
icon_state = "sheet-hide"
|
||||
drop_sound = 'sound/items/drop/cloth.ogg'
|
||||
pickup_sound = 'sound/items/pickup/cloth.ogg'
|
||||
amount = 1
|
||||
max_amount = 20
|
||||
stacktype = "hide"
|
||||
no_variants = TRUE
|
||||
// This needs to be very clearly documented for players. Whether it should stay in the main description is up for debate.
|
||||
/obj/item/stack/animalhide/examine(var/mob/user)
|
||||
. = ..()
|
||||
. += description_info
|
||||
|
||||
//Step one - dehairing.
|
||||
/obj/item/stack/animalhide/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(has_edge(W) || is_sharp(W))
|
||||
//visible message on mobs is defined as visible_message(var/message, var/self_message, var/blind_message)
|
||||
user.visible_message("<span class='notice'>\The [user] starts cutting hair off \the [src]</span>", "<span class='notice'>You start cutting the hair off \the [src]</span>", "You hear the sound of a knife rubbing against flesh")
|
||||
var/scraped = 0
|
||||
while(amount > 0 && do_after(user, 2.5 SECONDS)) // 2.5s per hide
|
||||
//Try locating an exisitng stack on the tile and add to there if possible
|
||||
var/obj/item/stack/hairlesshide/H = null
|
||||
for(var/obj/item/stack/hairlesshide/HS in user.loc) // Could be scraping something inside a locker, hence the .loc, not get_turf
|
||||
if(HS.amount < HS.max_amount)
|
||||
H = HS
|
||||
break
|
||||
|
||||
// Either we found a valid stack, in which case increment amount,
|
||||
// Or we need to make a new stack
|
||||
if(istype(H))
|
||||
H.amount++
|
||||
else
|
||||
H = new /obj/item/stack/hairlesshide(user.loc)
|
||||
|
||||
// Increment the amount
|
||||
src.use(1)
|
||||
scraped++
|
||||
|
||||
if(scraped)
|
||||
to_chat(user, SPAN_NOTICE("You scrape the hair off [scraped] hide\s."))
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/stack/animalhide/human
|
||||
name = "skin"
|
||||
desc = "The by-product of sapient farming."
|
||||
singular_name = "skin piece"
|
||||
icon_state = "sheet-hide"
|
||||
no_variants = FALSE
|
||||
drop_sound = 'sound/items/drop/leather.ogg'
|
||||
pickup_sound = 'sound/items/pickup/leather.ogg'
|
||||
stacktype = "hide-human"
|
||||
|
||||
/obj/item/stack/animalhide/corgi
|
||||
name = "corgi hide"
|
||||
desc = "The by-product of corgi farming."
|
||||
singular_name = "corgi hide piece"
|
||||
icon_state = "sheet-corgi"
|
||||
stacktype = "hide-corgi"
|
||||
|
||||
/obj/item/stack/animalhide/cat
|
||||
name = "cat hide"
|
||||
desc = "The by-product of cat farming."
|
||||
singular_name = "cat hide piece"
|
||||
icon_state = "sheet-cat"
|
||||
stacktype = "hide-cat"
|
||||
|
||||
/obj/item/stack/animalhide/monkey
|
||||
name = "monkey hide"
|
||||
desc = "The by-product of monkey farming."
|
||||
singular_name = "monkey hide piece"
|
||||
icon_state = "sheet-monkey"
|
||||
stacktype = "hide-monkey"
|
||||
|
||||
/obj/item/stack/animalhide/lizard
|
||||
name = "lizard skin"
|
||||
desc = "Sssssss..."
|
||||
singular_name = "lizard skin piece"
|
||||
icon_state = "sheet-lizard"
|
||||
stacktype = "hide-lizard"
|
||||
|
||||
/obj/item/stack/animalhide/xeno
|
||||
name = "alien hide"
|
||||
desc = "The skin of a terrible creature."
|
||||
singular_name = "alien hide piece"
|
||||
icon_state = "sheet-xeno"
|
||||
stacktype = "hide-xeno"
|
||||
@@ -0,0 +1,48 @@
|
||||
//Step two - washing..... it's actually in washing machine code, and ere.
|
||||
|
||||
/obj/item/stack/hairlesshide
|
||||
name = "hairless hide"
|
||||
desc = "This hide was stripped of it's hair, but still needs tanning."
|
||||
description_info = "Get it <b><font color='blue'>wet</font></b> to continue tanning this into leather.<br>\
|
||||
You could set it in a river, wash it with a sink, or just splash water on it with a bucket."
|
||||
singular_name = "hairless hide piece"
|
||||
icon_state = "sheet-hairlesshide"
|
||||
no_variants = FALSE
|
||||
max_amount = 20
|
||||
stacktype = "hairlesshide"
|
||||
|
||||
/obj/item/stack/hairlesshide/examine(var/mob/user)
|
||||
. = ..()
|
||||
. += description_info
|
||||
|
||||
/obj/item/stack/hairlesshide/water_act(var/wateramount)
|
||||
. = ..()
|
||||
wateramount = min(amount, round(wateramount))
|
||||
for(var/i in 1 to wateramount)
|
||||
var/obj/item/stack/wetleather/H = null
|
||||
for(var/obj/item/stack/wetleather/HS in get_turf(src)) // Doesn't have a user, can't just use their loc
|
||||
if(HS.amount < HS.max_amount)
|
||||
H = HS
|
||||
break
|
||||
|
||||
// Either we found a valid stack, in which case increment amount,
|
||||
// Or we need to make a new stack
|
||||
if(istype(H))
|
||||
H.amount++
|
||||
else
|
||||
H = new /obj/item/stack/wetleather(get_turf(src))
|
||||
|
||||
// Increment the amount
|
||||
src.use(1)
|
||||
|
||||
/obj/item/stack/hairlesshide/proc/rapidcure(var/stacknum = 1)
|
||||
stacknum = min(stacknum, amount)
|
||||
|
||||
while(stacknum)
|
||||
var/obj/item/stack/wetleather/I = new /obj/item/stack/wetleather(get_turf(src))
|
||||
|
||||
if(istype(I))
|
||||
I.dry()
|
||||
|
||||
use(1)
|
||||
stacknum -= 1
|
||||
@@ -0,0 +1,51 @@
|
||||
//Step three - drying
|
||||
/obj/item/stack/wetleather
|
||||
name = "wet leather"
|
||||
desc = "This leather has been cleaned but still needs to be dried."
|
||||
description_info = "To finish tanning the leather, you need to dry it. \
|
||||
You could place it under a <b><font color='red'>fire</font></b>, \
|
||||
put it in a <b><font color='blue'>drying rack</font></b>, \
|
||||
or build a <b><font color='brown'>tanning rack</font></b> from steel or wooden boards."
|
||||
singular_name = "wet leather piece"
|
||||
icon_state = "sheet-wetleather"
|
||||
var/wetness = 30 //Reduced when exposed to high temperautres
|
||||
var/drying_threshold_temperature = 500 //Kelvin to start drying
|
||||
no_variants = FALSE
|
||||
max_amount = 20
|
||||
stacktype = "wetleather"
|
||||
|
||||
var/dry_type = /obj/item/stack/material/leather
|
||||
|
||||
/obj/item/stack/wetleather/examine(var/mob/user)
|
||||
. = ..()
|
||||
. += description_info
|
||||
. += "\The [src] is [get_dryness_text()]."
|
||||
|
||||
/obj/item/stack/wetleather/proc/get_dryness_text()
|
||||
if(wetness > 20)
|
||||
return "wet"
|
||||
if(wetness > 10)
|
||||
return "damp"
|
||||
if(wetness)
|
||||
return "almost dry"
|
||||
return "dry"
|
||||
|
||||
/obj/item/stack/wetleather/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
if(exposed_temperature >= drying_threshold_temperature)
|
||||
wetness--
|
||||
if(wetness == 0)
|
||||
dry()
|
||||
|
||||
/obj/item/stack/wetleather/proc/dry()
|
||||
var/obj/item/stack/material/leather/L = new(src.loc)
|
||||
L.amount = amount
|
||||
use(amount)
|
||||
return L
|
||||
|
||||
/obj/item/stack/wetleather/transfer_to(obj/item/stack/S, var/tamount=null, var/type_verified)
|
||||
. = ..()
|
||||
if(.) // If it transfers any, do a weighted average of the wetness
|
||||
var/obj/item/stack/wetleather/W = S
|
||||
var/oldamt = W.amount - .
|
||||
W.wetness = round(((oldamt * W.wetness) + (. * wetness)) / W.amount)
|
||||
@@ -0,0 +1,70 @@
|
||||
/obj/structure/tanning_rack
|
||||
name = "tanning rack"
|
||||
desc = "A rack used to stretch leather out and hold it taut during the tanning process."
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "spike"
|
||||
|
||||
var/obj/item/stack/wetleather/drying = null
|
||||
|
||||
/obj/structure/tanning_rack/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src) // SSObj fires ~every 2s , starting from wetness 30 takes ~1m
|
||||
|
||||
/obj/structure/tanning_rack/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/structure/tanning_rack/process()
|
||||
if(drying && drying.wetness)
|
||||
drying.wetness = max(drying.wetness - 1, 0)
|
||||
if(!drying.wetness)
|
||||
visible_message("The [drying] is dry!")
|
||||
update_icon()
|
||||
|
||||
/obj/structure/tanning_rack/examine(var/mob/user)
|
||||
. = ..()
|
||||
if(drying)
|
||||
. += "\The [drying] is [drying.get_dryness_text()]."
|
||||
|
||||
/obj/structure/tanning_rack/update_icon()
|
||||
overlays.Cut()
|
||||
if(drying)
|
||||
var/image/I
|
||||
if(drying.wetness)
|
||||
I = image(icon, "leather_wet")
|
||||
else
|
||||
I = image(icon, "leather_dry")
|
||||
add_overlay(I)
|
||||
|
||||
/obj/structure/tanning_rack/attackby(var/atom/A, var/mob/user)
|
||||
if(istype(A, /obj/item/stack/wetleather))
|
||||
if(!drying) // If not drying anything, start drying the thing
|
||||
if(user.unEquip(A, target = src))
|
||||
drying = A
|
||||
else // Drying something, add if possible
|
||||
var/obj/item/stack/wetleather/W = A
|
||||
W.transfer_to(drying, W.amount, TRUE)
|
||||
update_icon()
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/structure/tanning_rack/attack_hand(var/mob/user)
|
||||
if(drying)
|
||||
var/obj/item/stack/S = drying
|
||||
if(!drying.wetness) // If it's dry, make a stack of dry leather and prepare to put that in their hands
|
||||
var/obj/item/stack/material/leather/L = new(src)
|
||||
L.amount = drying.amount
|
||||
drying.use(drying.amount)
|
||||
S = L
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!H.put_in_any_hand_if_possible(S))
|
||||
S.forceMove(get_turf(src))
|
||||
else
|
||||
S.forceMove(get_turf(src))
|
||||
drying = null
|
||||
update_icon()
|
||||
|
||||
/obj/structure/tanning_rack/attack_robot(var/mob/user)
|
||||
attack_hand(user) // That has checks to
|
||||
@@ -0,0 +1,23 @@
|
||||
/obj/item/stack/material/leather
|
||||
name = "leather"
|
||||
desc = "The by-product of mob grinding."
|
||||
icon_state = "sheet-leather"
|
||||
default_type = MAT_LEATHER
|
||||
no_variants = FALSE
|
||||
pass_color = TRUE
|
||||
strict_color_stacking = TRUE
|
||||
drop_sound = 'sound/items/drop/leather.ogg'
|
||||
pickup_sound = 'sound/items/pickup/leather.ogg'
|
||||
|
||||
/obj/item/stack/material/cloth
|
||||
name = "cloth"
|
||||
icon_state = "sheet-cloth"
|
||||
default_type = "cloth"
|
||||
no_variants = FALSE
|
||||
pass_color = TRUE
|
||||
strict_color_stacking = TRUE
|
||||
drop_sound = 'sound/items/drop/clothing.ogg'
|
||||
pickup_sound = 'sound/items/pickup/clothing.ogg'
|
||||
|
||||
/obj/item/stack/material/cloth/diyaab
|
||||
color = "#c6ccf0"
|
||||
@@ -0,0 +1,55 @@
|
||||
/obj/item/stack/material/wood
|
||||
name = "wooden plank"
|
||||
icon_state = "sheet-wood"
|
||||
default_type = MAT_WOOD
|
||||
strict_color_stacking = TRUE
|
||||
apply_colour = 1
|
||||
drop_sound = 'sound/items/drop/wooden.ogg'
|
||||
pickup_sound = 'sound/items/pickup/wooden.ogg'
|
||||
no_variants = FALSE
|
||||
|
||||
/obj/item/stack/material/wood/sif
|
||||
name = "alien wooden plank"
|
||||
color = "#0099cc"
|
||||
default_type = MAT_SIFWOOD
|
||||
|
||||
/obj/item/stack/material/log
|
||||
name = "log"
|
||||
icon_state = "sheet-log"
|
||||
default_type = MAT_LOG
|
||||
no_variants = FALSE
|
||||
color = "#824B28"
|
||||
max_amount = 25
|
||||
w_class = ITEMSIZE_HUGE
|
||||
description_info = "Use inhand to craft things, or use a sharp and edged object on this to convert it into two wooden planks."
|
||||
var/plank_type = /obj/item/stack/material/wood
|
||||
drop_sound = 'sound/items/drop/wooden.ogg'
|
||||
pickup_sound = 'sound/items/pickup/wooden.ogg'
|
||||
|
||||
/obj/item/stack/material/log/sif
|
||||
name = "alien log"
|
||||
default_type = MAT_SIFLOG
|
||||
color = "#0099cc"
|
||||
plank_type = /obj/item/stack/material/wood/sif
|
||||
|
||||
/obj/item/stack/material/log/attackby(var/obj/item/W, var/mob/user)
|
||||
if(!istype(W) || W.force <= 0)
|
||||
return ..()
|
||||
if(W.sharp && W.edge)
|
||||
var/time = (3 SECONDS / max(W.force / 10, 1)) * W.toolspeed
|
||||
user.setClickCooldown(time)
|
||||
if(do_after(user, time, src) && use(1))
|
||||
to_chat(user, "<span class='notice'>You cut up a log into planks.</span>")
|
||||
playsound(src, 'sound/effects/woodcutting.ogg', 50, 1)
|
||||
var/obj/item/stack/material/wood/existing_wood = null
|
||||
for(var/obj/item/stack/material/wood/M in user.loc)
|
||||
if(M.material.name == src.material.name)
|
||||
existing_wood = M
|
||||
break
|
||||
|
||||
var/obj/item/stack/material/wood/new_wood = new plank_type(user.loc)
|
||||
new_wood.amount = 2
|
||||
if(existing_wood && new_wood.transfer_to(existing_wood))
|
||||
to_chat(user, "<span class='notice'>You add the newly-formed wood to the stack. It now contains [existing_wood.amount] planks.</span>")
|
||||
else
|
||||
return ..()
|
||||
@@ -0,0 +1,15 @@
|
||||
/obj/item/stack/material/plastic
|
||||
name = "plastic"
|
||||
icon_state = "sheet-plastic"
|
||||
default_type = "plastic"
|
||||
no_variants = FALSE
|
||||
|
||||
/obj/item/stack/material/cardboard
|
||||
name = "cardboard"
|
||||
icon_state = "sheet-card"
|
||||
default_type = "cardboard"
|
||||
no_variants = FALSE
|
||||
pass_color = TRUE
|
||||
strict_color_stacking = TRUE
|
||||
drop_sound = 'sound/items/drop/cardboardbox.ogg'
|
||||
pickup_sound = 'sound/items/pickup/cardboardbox.ogg'
|
||||
@@ -0,0 +1,16 @@
|
||||
// Ok, technically not stones, but the snowbrick's function is similar to sandstone and marble
|
||||
/obj/item/stack/material/snow
|
||||
name = "snow"
|
||||
desc = "The temptation to build a snowman rises."
|
||||
icon_state = "sheet-snow"
|
||||
drop_sound = 'sound/items/drop/gloves.ogg'
|
||||
pickup_sound = 'sound/items/pickup/clothing.ogg'
|
||||
default_type = "snow"
|
||||
|
||||
/obj/item/stack/material/snowbrick
|
||||
name = "snow brick"
|
||||
desc = "For all of your igloo building needs."
|
||||
icon_state = "sheet-snowbrick"
|
||||
default_type = "packed snow"
|
||||
drop_sound = 'sound/items/drop/gloves.ogg'
|
||||
pickup_sound = 'sound/items/pickup/clothing.ogg'
|
||||
@@ -0,0 +1,15 @@
|
||||
/obj/item/stack/material/sandstone
|
||||
name = "sandstone brick"
|
||||
icon_state = "sheet-sandstone"
|
||||
default_type = "sandstone"
|
||||
no_variants = FALSE
|
||||
drop_sound = 'sound/items/drop/boots.ogg'
|
||||
pickup_sound = 'sound/items/pickup/boots.ogg'
|
||||
|
||||
/obj/item/stack/material/marble
|
||||
name = "marble brick"
|
||||
icon_state = "sheet-marble"
|
||||
default_type = "marble"
|
||||
no_variants = FALSE
|
||||
drop_sound = 'sound/items/drop/boots.ogg'
|
||||
pickup_sound = 'sound/items/pickup/boots.ogg'
|
||||
@@ -0,0 +1,55 @@
|
||||
// Forged in the equivalent of Hell, one piece at a time.
|
||||
/obj/item/stack/material/supermatter
|
||||
name = MAT_SUPERMATTER
|
||||
icon_state = "sheet-super"
|
||||
item_state = "diamond"
|
||||
default_type = MAT_SUPERMATTER
|
||||
apply_colour = TRUE
|
||||
|
||||
/obj/item/stack/material/supermatter/proc/update_mass() // Due to how dangerous they can be, the item will get heavier and larger the more are in the stack.
|
||||
slowdown = amount / 10
|
||||
w_class = min(5, round(amount / 10) + 1)
|
||||
throw_range = round(amount / 7) + 1
|
||||
|
||||
/obj/item/stack/material/supermatter/use(var/used)
|
||||
. = ..()
|
||||
update_mass()
|
||||
return
|
||||
|
||||
/obj/item/stack/material/supermatter/attack_hand(mob/user)
|
||||
. = ..()
|
||||
|
||||
update_mass()
|
||||
SSradiation.radiate(src, 5 + amount)
|
||||
var/mob/living/M = user
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
var/burn_user = TRUE
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/clothing/gloves/G = H.gloves
|
||||
if(istype(G) && ((G.flags & THICKMATERIAL && prob(70)) || istype(G, /obj/item/clothing/gloves/gauntlets)))
|
||||
burn_user = FALSE
|
||||
|
||||
if(burn_user)
|
||||
H.visible_message("<span class='danger'>\The [src] flashes as it scorches [H]'s hands!</span>")
|
||||
H.apply_damage(amount / 2 + 5, BURN, "r_hand", used_weapon="Supermatter Chunk")
|
||||
H.apply_damage(amount / 2 + 5, BURN, "l_hand", used_weapon="Supermatter Chunk")
|
||||
H.drop_from_inventory(src, get_turf(H))
|
||||
return
|
||||
|
||||
if(istype(user, /mob/living/silicon/robot))
|
||||
burn_user = FALSE
|
||||
|
||||
if(burn_user)
|
||||
M.apply_damage(amount, BURN, null, used_weapon="Supermatter Chunk")
|
||||
|
||||
/obj/item/stack/material/supermatter/ex_act(severity) // An incredibly hard to manufacture material, SM chunks are unstable by their 'stabilized' nature.
|
||||
if(prob((4 / severity) * 20))
|
||||
SSradiation.radiate(get_turf(src), amount * 4)
|
||||
explosion(get_turf(src),round(amount / 12) , round(amount / 6), round(amount / 3), round(amount / 25))
|
||||
qdel(src)
|
||||
return
|
||||
SSradiation.radiate(get_turf(src), amount * 2)
|
||||
..()
|
||||
Reference in New Issue
Block a user