mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-05 14:32:52 +00:00
* Craftable material sniffers (#74798) ## About The Pull Request Are YOU annoyed about never finding the fucking mats you need? Slap some cable coil on an analyzer and find that untouched sheet of iron and or glass. It's a pinpointer for basic sheets. ## Why It's Good For The Game Originally I meant to give this as something borgs might want, but I realized they really won't have a great time using it and the situation is more about botanists not being asked, and not knowing how to grow lots of iron, repeat for all other departments. Awareness problems!!! But I still like the item as a miscellaneous craftable. ## Changelog 🆑 add: Craftable Material sniffers /🆑 --------- Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com> * Craftable material sniffers --------- Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com> Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com>
66 lines
2.3 KiB
Plaintext
66 lines
2.3 KiB
Plaintext
/obj/item/stack/sheet
|
|
name = "sheet"
|
|
lefthand_file = 'icons/mob/inhands/items/sheets_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/items/sheets_righthand.dmi'
|
|
icon_state = "sheet-metal_3"
|
|
full_w_class = WEIGHT_CLASS_NORMAL
|
|
force = 5
|
|
throwforce = 5
|
|
max_amount = 50
|
|
throw_speed = 1
|
|
throw_range = 3
|
|
attack_verb_continuous = list("bashes", "batters", "bludgeons", "thrashes", "smashes")
|
|
attack_verb_simple = list("bash", "batter", "bludgeon", "thrash", "smash")
|
|
novariants = FALSE
|
|
material_flags = MATERIAL_EFFECTS
|
|
var/sheettype = null //this is used for girders in the creation of walls/false walls
|
|
var/point_value = 0 //turn-in value for the gulag stacker - loosely relative to its rarity.
|
|
///What type of wall does this sheet spawn
|
|
var/walltype
|
|
/// whether this sheet can be sniffed by the material sniffer
|
|
var/sniffable = FALSE
|
|
|
|
/obj/item/stack/sheet/Initialize(mapload, new_amount, merge = TRUE, list/mat_override=null, mat_amt=1)
|
|
. = ..()
|
|
pixel_x = rand(-4, 4)
|
|
pixel_y = rand(-4, 4)
|
|
if(sniffable && is_station_level(z) && amount < 10)
|
|
GLOB.sniffable_sheets += src
|
|
|
|
/obj/item/stack/sheet/Destroy(force)
|
|
if(sniffable)
|
|
GLOB.sniffable_sheets -= src
|
|
return ..()
|
|
|
|
/obj/item/stack/sheet/add(_amount)
|
|
. = ..()
|
|
if(sniffable && is_station_level(z) && amount > 10)
|
|
GLOB.sniffable_sheets += src
|
|
|
|
/// removing from sniffable handled by the sniffer itself when it checks for targets
|
|
|
|
/**
|
|
* Facilitates sheets being smacked on the floor
|
|
*
|
|
* This is used for crafting by hitting the floor with items.
|
|
* The inital use case is glass sheets breaking in to shards when the floor is hit.
|
|
* Args:
|
|
* * user: The user that did the action
|
|
* * params: paramas passed in from attackby
|
|
*/
|
|
/obj/item/stack/sheet/proc/on_attack_floor(mob/user, params)
|
|
var/list/shards = list()
|
|
for(var/datum/material/mat in custom_materials)
|
|
if(mat.shard_type)
|
|
var/obj/item/new_shard = new mat.shard_type(user.loc)
|
|
new_shard.add_fingerprint(user)
|
|
shards += "\a [new_shard.name]"
|
|
if(!shards.len)
|
|
return FALSE
|
|
user.do_attack_animation(src, ATTACK_EFFECT_BOOP)
|
|
playsound(src, SFX_SHATTER, 70, TRUE)
|
|
use(1)
|
|
user.visible_message(span_notice("[user] shatters the sheet of [name] on the floor, leaving [english_list(shards)]."), \
|
|
span_notice("You shatter the sheet of [name] on the floor, leaving [english_list(shards)]."))
|
|
return TRUE
|