Files
vgstation13/code/game/objects/items/stacks/teeth.dm
west3436 434ac40c7a Fire Rework (#35988)
* initial commit

* switcheroo

* include the rest

* fire triangle

* a

* update 2-20

* turfs and reagents and more

* zburn first draft

* remove fire_old

* initial compat

* stable compile

* remove pressure factor

* total autoignition death

* thermal material datums

* a

* more autoignition

* temporary fix for testing

* everything is FUCK

* burning now

* stacks burning

* recursive functionality

* restore burnitselfup

* specific burn case

* everything is shit and fuck

* refactor

* nit

* color & light performance increase

* fix

* smoke cap + changes

* updates

* final (for now)

* remove double count, unit issues, and more tweaks

* logspam and grammar

* prevents worn or held items from burning

* minimum burn time

* fix runtime

* The Cardboard Update

* vis_contents

* cigs burn lol

* lmao

* refactor fire protection

* final fix

* some more held/worn item fixes

* maybe fix foods burning forever

* compile

* restore plasma burning lmao

* review changes

* copypasta error

* copypasta errors 2: this time it's personal

* declare

* extensive fixes

* fix liquid burning behavior

* wtf

* undo smoke cap

* mutable appearances + removal of debug messages

* DMDOC compat

* review changes

* return

* misleading comment
2024-05-14 07:43:39 -05:00

98 lines
2.6 KiB
Plaintext

/obj/item/stack/teeth
name = "teeth"
singular_name = "tooth"
irregular_plural = "teeth"
icon = 'icons/obj/butchering_products.dmi'
icon_state = "tooth"
amount = 1
max_amount = 50
w_class = W_CLASS_TINY
w_type = RECYK_BIOLOGICAL
throw_speed = 4
throw_range = 10
flammable = TRUE
var/animal_type
/obj/item/stack/teeth/New(loc, amount)
.=..()
pixel_x = rand(-24,24) * PIXEL_MULTIPLIER
pixel_y = rand(-24,24) * PIXEL_MULTIPLIER
/obj/item/stack/teeth/can_stack_with(obj/item/other_stack)
if(!istype(other_stack))
return 0
if(src.type == other_stack.type)
var/obj/item/stack/teeth/T = other_stack
if(src.animal_type == T.animal_type)
return 1
return 0
/obj/item/stack/teeth/attackby(obj/item/W, mob/user)
.=..()
if(istype(W,/obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if(src.amount < 10)
to_chat(user, "<span class='info'>You need at least 10 teeth to create a necklace.</span>")
return
if(C.use(5))
user.drop_item(src, force_drop = 1)
var/obj/item/clothing/mask/necklace/teeth/X = new(get_turf(src))
X.animal_type = src.animal_type
X.teeth_amount = amount
X.update_name()
user.put_in_active_hand(X)
to_chat(user, "<span class='info'>You create a [X.name] out of [amount] [src] and \the [C].</span>")
qdel(src)
else
to_chat(user, "<span class='info'>You need at least 5 lengths of cable to do this!</span>")
/obj/item/stack/teeth/copy_evidences(obj/item/stack/from as obj)
.=..()
if(istype(from, /obj/item/stack/teeth))
var/obj/item/stack/teeth/original_teeth = from
src.animal_type = original_teeth.animal_type
src.name = original_teeth.name
src.singular_name = original_teeth.name
/obj/item/stack/teeth/proc/update_name(mob/parent)
if(!parent)
return
if(isliving(parent))
var/mob/living/L = parent
var/mob/parent_species = L.species_type
var/parent_species_name = initial(parent_species.name)
if(ishuman(parent))
var/mob/living/carbon/human/H = parent
if(H.species)
parent_species_name = lowertext(H.species.name)
else
parent_species_name = "human"
name = "[parent_species_name] teeth"
singular_name = "[parent_species_name] tooth"
animal_type = parent_species
/obj/item/stack/teeth/gold
name = "gold teeth"
singular_name = "gold tooth"
irregular_plural = "gold teeth"
icon = 'icons/obj/butchering_products.dmi'
icon_state = "tooth-gold"
amount = 1
max_amount = 50
w_class = W_CLASS_TINY
throw_speed = 4
throw_range = 10
starting_materials = list(MAT_GOLD = CC_PER_SHEET_GOLD) // Recipe requires 1 sheet. Could probably stand to be less though
w_type = RECYK_METAL