mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
Burning paper (and similar) is now two way (you can hold a paper to your cigarette to burn it) (#90307)
## About The Pull Request 1. Burning paper (and similar) is now two way - rather than necessitating you touch the paper with the burning thing, you can now touch the burning thing with the paper 2. You can now light a cigarette on a lit candle 3. Candles no longer craft into flashlight eyes ## Why It's Good For The Game 1. Burning money with a cigarette larp 2. Cool Frenchman larp 3. ??? I noticed you can't light a candle with a candle because it tried to craft flashlight eyes. ## Changelog 🆑 Melbert qol: Burning paper (and similar) is now two way. Rather than needing to click on the paper with a burning item, you can now click on a burning item with the paper. This means you can burn paper on your lit cigarette like a badass. qol: You can now light cigarettes on candles. del: Flares and candles can no longer craft into flashlight eyes, I guess. /🆑
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
/obj/item/folder/Initialize(mapload)
|
||||
update_icon()
|
||||
. = ..()
|
||||
AddElement(/datum/element/burn_on_item_ignition)
|
||||
|
||||
/obj/item/folder/Destroy()
|
||||
for(var/obj/important_thing in contents)
|
||||
@@ -79,8 +80,6 @@
|
||||
return paper_overlay
|
||||
|
||||
/obj/item/folder/attackby(obj/item/weapon, mob/user, params)
|
||||
if(burn_paper_product_attackby_check(weapon, user))
|
||||
return
|
||||
if(is_type_in_typecache(weapon, folder_insertables))
|
||||
//Add paper, photo or documents into the folder
|
||||
if(!user.transferItemToLoc(weapon, src))
|
||||
|
||||
@@ -79,6 +79,9 @@
|
||||
if(can_become_message_in_bottle && !mapload && prob(MESSAGE_BOTTLE_CHANCE))
|
||||
LAZYADD(SSpersistence.queued_message_bottles, src)
|
||||
|
||||
AddElement(/datum/element/burn_on_item_ignition)
|
||||
RegisterSignal(src, COMSIG_ATOM_IGNITED_BY_ITEM, PROC_REF(close_paper_ui))
|
||||
|
||||
/obj/item/paper/Destroy()
|
||||
camera_holder = null
|
||||
clear_paper()
|
||||
@@ -90,6 +93,10 @@
|
||||
custom_fire_overlay = mutable_appearance('icons/obj/service/bureaucracy.dmi', "paper_onfire_overlay", appearance_flags = RESET_COLOR|KEEP_APART)
|
||||
return custom_fire_overlay
|
||||
|
||||
/obj/item/paper/proc/close_paper_ui()
|
||||
SIGNAL_HANDLER
|
||||
SStgui.close_uis(src)
|
||||
|
||||
/// Determines whether this paper has been written or stamped to.
|
||||
/obj/item/paper/proc/is_empty()
|
||||
return !(LAZYLEN(raw_text_inputs) || LAZYLEN(raw_stamp_data))
|
||||
@@ -407,37 +414,7 @@
|
||||
user.put_in_hands(new_plane)
|
||||
return new_plane
|
||||
|
||||
/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
|
||||
//already on fire!
|
||||
if(resistance_flags & ON_FIRE)
|
||||
return FALSE
|
||||
var/ignition_message = attacking_item.ignition_effect(src, user)
|
||||
if(!ignition_message)
|
||||
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(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 TRUE
|
||||
|
||||
if(user.is_holding(src)) //no TK shit here.
|
||||
user.dropItemToGround(src)
|
||||
user.visible_message(ignition_message)
|
||||
add_fingerprint(user)
|
||||
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))
|
||||
SStgui.close_uis(src)
|
||||
return
|
||||
|
||||
// Enable picking paper up by clicking on it with the clipboard or folder
|
||||
if(istype(attacking_item, /obj/item/clipboard) || istype(attacking_item, /obj/item/folder) || istype(attacking_item, /obj/item/paper_bin))
|
||||
attacking_item.attackby(src, user)
|
||||
@@ -530,6 +507,8 @@
|
||||
)
|
||||
|
||||
/obj/item/paper/ui_interact(mob/user, datum/tgui/ui)
|
||||
if(resistance_flags & ON_FIRE)
|
||||
return
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "PaperSheet", name)
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
if(istype(internal_paper, /obj/item/paper/carbon_copy))
|
||||
icon_state = "[base_icon_state]_carbon"
|
||||
update_appearance(UPDATE_ICON)
|
||||
AddElement(/datum/element/burn_on_item_ignition)
|
||||
|
||||
/obj/item/paperplane/Exited(atom/movable/gone, direction)
|
||||
. = ..()
|
||||
@@ -80,8 +81,6 @@
|
||||
user.put_in_hands(released_paper)
|
||||
|
||||
/obj/item/paperplane/attackby(obj/item/attacking_item, mob/user, params)
|
||||
if(burn_paper_product_attackby_check(attacking_item, user))
|
||||
return
|
||||
if(IS_WRITING_UTENSIL(attacking_item))
|
||||
to_chat(user, span_warning("You should unfold [src] before changing it!"))
|
||||
return
|
||||
|
||||
@@ -253,6 +253,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/ticket_machine, 32)
|
||||
name += " #[num]"
|
||||
saved_maptext = MAPTEXT(num)
|
||||
maptext = saved_maptext
|
||||
AddElement(/datum/element/burn_on_item_ignition)
|
||||
|
||||
/obj/item/ticket_machine_ticket/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -265,12 +266,6 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/ticket_machine, 32)
|
||||
. = ..()
|
||||
maptext = saved_maptext //For some reason, storage code removes all maptext off objs, this stops its number from being wiped off when taken out of storage.
|
||||
|
||||
/obj/item/ticket_machine_ticket/attackby(obj/item/P, mob/living/carbon/human/user, params) //Stolen from papercode
|
||||
if(burn_paper_product_attackby_check(P, user))
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/ticket_machine_ticket/Destroy()
|
||||
if(source)
|
||||
source.ticket_holders -= owner_ref
|
||||
|
||||
Reference in New Issue
Block a user