mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-23 21:26:30 +01:00
Fresh Meat, Leatherworking (#7629)
* Make Butchering more modular. Don't tell the demon lords. * No guts no glory. That was far more work than expected to get organs to just process and work for butchering holy shit. * Chitin and hides oh my. * squeak. ..Why did this not fire on local? * Squelch. * Seven cubed livers, for the doctors in their sterile halls. * Changeling * Prep for Datums * Fix Broken Broken Guns * Redundancy * F l a g s
This commit is contained in:
@@ -1,70 +1,75 @@
|
||||
/obj/item/stack/animalhide
|
||||
name = "hide"
|
||||
desc = "The hide of some creature."
|
||||
icon_state = "sheet-hide"
|
||||
drop_sound = 'sound/items/drop/cloth.ogg'
|
||||
pickup_sound = 'sound/items/pickup/cloth.ogg'
|
||||
amount = 1
|
||||
stacktype = "hide"
|
||||
no_variants = TRUE
|
||||
|
||||
var/process_type = /obj/item/stack/hairlesshide
|
||||
|
||||
/obj/item/stack/animalhide/human
|
||||
name = "human skin"
|
||||
desc = "The by-product of human farming."
|
||||
singular_name = "human skin piece"
|
||||
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'
|
||||
|
||||
/obj/item/stack/animalhide/human
|
||||
amount = 50
|
||||
amount = 1
|
||||
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"
|
||||
|
||||
/obj/item/stack/animalhide/corgi
|
||||
amount = 50
|
||||
amount = 1
|
||||
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"
|
||||
|
||||
/obj/item/stack/animalhide/cat
|
||||
amount = 50
|
||||
amount = 1
|
||||
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"
|
||||
|
||||
/obj/item/stack/animalhide/monkey
|
||||
amount = 50
|
||||
amount = 1
|
||||
stacktype = "hide-monkey"
|
||||
|
||||
/obj/item/stack/animalhide/lizard
|
||||
name = "lizard skin"
|
||||
desc = "Sssssss..."
|
||||
singular_name = "lizard skin piece"
|
||||
icon_state = "sheet-lizard"
|
||||
|
||||
/obj/item/stack/animalhide/lizard
|
||||
amount = 50
|
||||
amount = 1
|
||||
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"
|
||||
|
||||
/obj/item/stack/animalhide/xeno
|
||||
amount = 50
|
||||
amount = 1
|
||||
stacktype = "hide-xeno"
|
||||
|
||||
//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 hide piece"
|
||||
singular_name = "alien chitin piece"
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "chitin"
|
||||
|
||||
/obj/item/stack/xenochitin
|
||||
amount = 50
|
||||
amount = 1
|
||||
stacktype = "hide-chitin"
|
||||
|
||||
/obj/item/xenos_claw
|
||||
name = "alien claw"
|
||||
@@ -84,9 +89,22 @@
|
||||
singular_name = "hairless hide piece"
|
||||
icon_state = "sheet-hairlesshide"
|
||||
no_variants = FALSE
|
||||
amount = 1
|
||||
stacktype = "hairlesshide"
|
||||
var/cleaning = FALSE // Can we be water_acted, or are we busy? To prevent accidental hide duplication and the collapse of causality.
|
||||
|
||||
/obj/item/stack/hairlesshide
|
||||
amount = 50
|
||||
var/wet_type = /obj/item/stack/wetleather
|
||||
|
||||
/obj/item/stack/hairlesshide/water_act(var/wateramount)
|
||||
..()
|
||||
cleaning = TRUE
|
||||
while(amount > 0 && wateramount > 0)
|
||||
use(1)
|
||||
wateramount--
|
||||
new wet_type(get_turf(src))
|
||||
cleaning = FALSE
|
||||
|
||||
return
|
||||
|
||||
/obj/item/stack/wetleather
|
||||
name = "wet leather"
|
||||
@@ -96,29 +114,28 @@
|
||||
var/wetness = 30 //Reduced when exposed to high temperautres
|
||||
var/drying_threshold_temperature = 500 //Kelvin to start drying
|
||||
no_variants = FALSE
|
||||
amount = 1
|
||||
stacktype = "wetleather"
|
||||
|
||||
/obj/item/stack/wetleather
|
||||
amount = 50
|
||||
var/dry_type = /obj/item/stack/material/leather
|
||||
|
||||
//Step one - dehairing.
|
||||
/obj/item/stack/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/twohanded/fireaxe) || \
|
||||
istype(W, /obj/item/weapon/material/knife/machete/hatchet) )
|
||||
|
||||
if(has_edge(W) || is_sharp(W))
|
||||
//visible message on mobs is defined as visible_message(var/message, var/self_message, var/blind_message)
|
||||
usr.visible_message("<span class='notice'>\The [usr] 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")
|
||||
if(do_after(user,50))
|
||||
to_chat(usr, "<span class='notice'>You cut the hair from this [src.singular_name]</span>")
|
||||
//Try locating an exisitng stack on the tile and add to there if possible
|
||||
for(var/obj/item/stack/hairlesshide/HS in usr.loc)
|
||||
if(HS.amount < 50)
|
||||
if(HS.amount < 50 && istype(HS, process_type))
|
||||
HS.amount++
|
||||
src.use(1)
|
||||
break
|
||||
return
|
||||
//If it gets to here it means it did not find a suitable stack on the tile.
|
||||
var/obj/item/stack/hairlesshide/HS = new(usr.loc)
|
||||
HS.amount = 1
|
||||
var/obj/item/stack/HS = new process_type(usr.loc)
|
||||
if(istype(HS))
|
||||
HS.amount = 1
|
||||
src.use(1)
|
||||
else
|
||||
..()
|
||||
@@ -132,15 +149,20 @@
|
||||
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/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/material/leather/HS = new(src.loc)
|
||||
HS.amount = 1
|
||||
dry()
|
||||
|
||||
/obj/item/stack/wetleather/proc/dry()
|
||||
//Try locating an exisitng stack on the tile and add to there if possible
|
||||
for(var/obj/item/stack/material/leather/HS in src.loc)
|
||||
if(HS.amount < 50)
|
||||
HS.amount++
|
||||
wetness = initial(wetness)
|
||||
src.use(1)
|
||||
return
|
||||
//If it gets to here it means it did not find a suitable stack on the tile.
|
||||
var/obj/item/stack/HS = new dry_type(src.loc)
|
||||
|
||||
if(istype(HS))
|
||||
HS.amount = 1
|
||||
wetness = initial(wetness)
|
||||
src.use(1)
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
/obj/item/stack/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
|
||||
if(Adjacent(user))
|
||||
if(!uses_charge)
|
||||
. += "There are [src.amount] [src.singular_name]\s in the stack."
|
||||
@@ -378,17 +378,17 @@
|
||||
var/use_material
|
||||
var/pass_color
|
||||
|
||||
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, pass_stack_color)
|
||||
src.title = title
|
||||
src.result_type = result_type
|
||||
src.req_amount = req_amount
|
||||
src.res_amount = res_amount
|
||||
src.max_res_amount = max_res_amount
|
||||
src.time = time
|
||||
src.one_per_turf = one_per_turf
|
||||
src.on_floor = on_floor
|
||||
src.use_material = supplied_material
|
||||
src.pass_color = pass_stack_color
|
||||
/datum/stack_recipe/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, pass_stack_color)
|
||||
src.title = title
|
||||
src.result_type = result_type
|
||||
src.req_amount = req_amount
|
||||
src.res_amount = res_amount
|
||||
src.max_res_amount = max_res_amount
|
||||
src.time = time
|
||||
src.one_per_turf = one_per_turf
|
||||
src.on_floor = on_floor
|
||||
src.use_material = supplied_material
|
||||
src.pass_color = pass_stack_color
|
||||
|
||||
/*
|
||||
* Recipe list datum
|
||||
|
||||
@@ -240,6 +240,16 @@
|
||||
|
||||
removed.add_thermal_energy(heat_transfer)
|
||||
|
||||
for(var/mob/living/L in view(3, src))
|
||||
L.add_modifier(/datum/modifier/endothermic, 10 SECONDS, null, TRUE)
|
||||
|
||||
for(var/obj/item/stack/wetleather/WL in view(2, src))
|
||||
if(WL.wetness >= 0)
|
||||
WL.dry()
|
||||
continue
|
||||
|
||||
WL.wetness = max(0, WL.wetness - rand(1, 4))
|
||||
|
||||
env.merge(removed)
|
||||
|
||||
/obj/structure/bonfire/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
|
||||
Reference in New Issue
Block a user