mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
- Fixed a bug where the removal of cable-cuffs with wirecutters displayed the "you have removed..." message to everyone and the "X has removed Y's cuffs..." to the person whose cuffs got cut off.
- Added the tanning micro-mechanic. Hide still not available in-game yet tho until sprites are added and some use for leather is made. I'll get on that soon<TM> git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3794 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -1183,7 +1183,7 @@
|
||||
|
||||
/obj/item/stack
|
||||
var/singular_name
|
||||
var/amount = 1.0
|
||||
var/amount = 1
|
||||
var/max_amount //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount
|
||||
|
||||
/obj/item/stack/rods
|
||||
@@ -1263,13 +1263,6 @@
|
||||
icon_state = "sheet-cloth"
|
||||
origin_tech = "materials=2"
|
||||
|
||||
/obj/item/stack/sheet/leather
|
||||
name = "leather"
|
||||
desc = "The by-product of monkey farming."
|
||||
singular_name = "leather piece"
|
||||
icon_state = "sheet-leather"
|
||||
origin_tech = "materials=2"
|
||||
|
||||
|
||||
/obj/item/stack/sheet/metal
|
||||
name = "metal"
|
||||
|
||||
78
code/defines/tanning/leather.dm
Normal file
78
code/defines/tanning/leather.dm
Normal file
@@ -0,0 +1,78 @@
|
||||
/obj/item/stack/sheet/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/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
|
||||
name = "wet leather"
|
||||
desc = "This leather has been cleaned but still needs to be dried."
|
||||
singular_name = "wet leather piece"
|
||||
icon_state = "sheet-wetleather"
|
||||
origin_tech = ""
|
||||
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) )
|
||||
|
||||
//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)
|
||||
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)
|
||||
HS.amount = 1
|
||||
src.use(1)
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
//Step two - washing..... it's actually in washing machine code.
|
||||
|
||||
//Step three - drying
|
||||
/obj/item/stack/sheet/wetleather/temperature_expose(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)
|
||||
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)
|
||||
HS.amount = 1
|
||||
wetness = initial(wetness)
|
||||
src.use(1)
|
||||
@@ -376,8 +376,8 @@ WELDINGTOOOL
|
||||
|
||||
/obj/item/weapon/wirecutters/attack(mob/M as mob, mob/user as mob)
|
||||
if((M.handcuffed) && (istype(M:handcuffed, /obj/item/weapon/handcuffs/cable)))
|
||||
M.visible_message("You cut \the [M]'s restraints with \the [src]!",\
|
||||
"\The [usr] cuts \the [M]'s restraints with \the [src]!",\
|
||||
usr.visible_message("\The [usr] cuts \the [M]'s restraints with \the [src]!",\
|
||||
"You cut \the [M]'s restraints with \the [src]!",\
|
||||
"You hear cable being cut.")
|
||||
M.handcuffed = null
|
||||
M.update_clothing()
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
if (src.amount<=0)
|
||||
var/oldsrc = src
|
||||
src = null //dont kill proc after del()
|
||||
usr.before_take_item(oldsrc)
|
||||
if(usr)
|
||||
usr.before_take_item(oldsrc)
|
||||
del(oldsrc)
|
||||
return
|
||||
|
||||
|
||||
@@ -40,6 +40,13 @@
|
||||
for(var/atom/A in contents)
|
||||
A.clean_blood()
|
||||
|
||||
//Tanning!
|
||||
for(var/obj/item/stack/sheet/hairlesshide/HH in contents)
|
||||
var/obj/item/stack/sheet/wetleather/WL = new(src)
|
||||
WL.amount = HH.amount
|
||||
del(HH)
|
||||
|
||||
|
||||
if(crayon)
|
||||
var/color
|
||||
if(istype(crayon,/obj/item/toy/crayon))
|
||||
@@ -180,7 +187,14 @@
|
||||
state = 3
|
||||
else
|
||||
..()
|
||||
else if(istype(W,/obj/item/clothing/under) || istype(W,/obj/item/clothing/mask) || istype(W,/obj/item/clothing/head) || istype(W,/obj/item/clothing/gloves) || istype(W,/obj/item/clothing/shoes) || istype(W,/obj/item/clothing/suit) || istype(W,/obj/item/weapon/bedsheet))
|
||||
else if(istype(W,/obj/item/stack/sheet/hairlesshide) || \
|
||||
istype(W,/obj/item/clothing/under) || \
|
||||
istype(W,/obj/item/clothing/mask) || \
|
||||
istype(W,/obj/item/clothing/head) || \
|
||||
istype(W,/obj/item/clothing/gloves) || \
|
||||
istype(W,/obj/item/clothing/shoes) || \
|
||||
istype(W,/obj/item/clothing/suit) || \
|
||||
istype(W,/obj/item/weapon/bedsheet))
|
||||
|
||||
//YES, it's hardcoded... saves a var/can_be_washed for every single clothing item.
|
||||
if ( istype(W,/obj/item/clothing/suit/space ) )
|
||||
|
||||
Reference in New Issue
Block a user