Adds book burning (#74873)

## About The Pull Request

For some reason, unlike other paper items, you couldn't ignite books
with a lighter or other hot item.
Now, you can!

(Also made it so the odd obscure mechanic of cutting pages out of books
can be done by any sharp item, not just wirecutters or knives)

## Why It's Good For The Game

Consistency. 
~~Burning copies of WGW.~~

## Changelog

🆑
add: Books can now be burned just like any other paper item.
add: You can cut pages out of books with any sharp item, not just knives
or wirecutters.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
This commit is contained in:
ChungusGamer666
2023-04-23 17:26:17 -06:00
committed by GitHub
co-authored by san7890
parent a9919a03a2
commit 0d75ee8e6e
2 changed files with 26 additions and 20 deletions
+12 -9
View File
@@ -351,25 +351,28 @@
return TRUE
return ..()
/obj/item/proc/burn_paper_product_attackby_check(obj/item/I, mob/living/user, bypass_clumsy)
var/ignition_message = I.ignition_effect(src, user)
/obj/item/proc/burn_paper_product_attackby_check(obj/item/attacking_item, mob/living/user, bypass_clumsy = FALSE)
//can't be put on fire!
if((resistance_flags & FIRE_PROOF) || !(resistance_flags & FLAMMABLE))
return FALSE
var/ignition_message = attacking_item.ignition_effect(src, user)
if(!ignition_message)
return
. = TRUE
return FALSE
if(!bypass_clumsy && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(10) && Adjacent(user))
user.visible_message(span_warning("[user] accidentally ignites [user.p_them()]self!"), \
span_userdanger("You miss [src] and accidentally light yourself on fire!"))
if(user.is_holding(I)) //checking if they're holding it in case TK is involved
user.dropItemToGround(I)
user.adjust_fire_stacks(1)
if(user.is_holding(attacking_item)) //checking if they're holding it in case TK is involved
user.dropItemToGround(attacking_item)
user.adjust_fire_stacks(attacking_item)
user.ignite_mob()
return
return TRUE
if(user.is_holding(src)) //no TK shit here.
user.dropItemToGround(src)
user.visible_message(ignition_message)
add_fingerprint(user)
fire_act(I.get_temperature())
fire_act(attacking_item.get_temperature())
return TRUE
/obj/item/paper/attackby(obj/item/attacking_item, mob/living/user, params)
if(burn_paper_product_attackby_check(attacking_item, user))