mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-15 03:27:46 +00:00
## About The Pull Request
- Large amount of storage datum cleanup.
- Documentation.
- Maybe more consistent use of parent vs real_location.
- Removes the weakrefs, replaces it with just references.
- These were already managed references anyways so why bother?
- Removes a bunch of arguments no one used and would ever used so only
the most useful args are left.
- Some bugfixes.
## Why It's Good For The Game
Aiming to make storage easier to work with. The whole intent of this was
to bugfix the whole "weight class" thing that keeps popping up but I had
to do this first.
## Changelog
🆑 Melbert
fix: When placing an item into storage (such as backpacks), all nearby
mobs now get a message, rather than just the first mob.
fix: TGC decks of cards should act a bit less odd when looking inside.
refactor: Refactored a bit of storage, cleaned up a fair bit of its
code. Let me know if you notice anything funky about storage (like
backpacks).
/🆑
74 lines
2.5 KiB
Plaintext
74 lines
2.5 KiB
Plaintext
/**
|
|
* Wall safes
|
|
* Holds items and uses the lockable storage component
|
|
* to allow people to lock items up.
|
|
*/
|
|
/obj/structure/secure_safe
|
|
name = "secure safe"
|
|
desc = "Excellent for securing things away from grubby hands."
|
|
icon = 'icons/obj/storage/storage.dmi'
|
|
icon_state = "wall_safe"
|
|
base_icon_state = "wall_safe"
|
|
anchored = TRUE
|
|
density = FALSE
|
|
|
|
MAPPING_DIRECTIONAL_HELPERS(/obj/structure/secure_safe, 32)
|
|
|
|
/obj/structure/secure_safe/Initialize(mapload)
|
|
. = ..()
|
|
//this will create the storage for us.
|
|
AddComponent(/datum/component/lockable_storage)
|
|
find_and_hang_on_wall()
|
|
PopulateContents()
|
|
|
|
/obj/structure/secure_safe/proc/PopulateContents()
|
|
new /obj/item/paper(src)
|
|
new /obj/item/pen(src)
|
|
|
|
/obj/structure/secure_safe/hos
|
|
name = "head of security's safe"
|
|
|
|
/**
|
|
* This safe is meant to be damn robust. To break in, you're supposed to get creative, or use acid or an explosion.
|
|
*
|
|
* This makes the safe still possible to break in for someone who is prepared and capable enough, either through
|
|
* chemistry, botany or whatever else.
|
|
*
|
|
* The safe is also weak to explosions, so spending some early TC could allow an antag to blow it upen if they can
|
|
* get access to it.
|
|
*/
|
|
/obj/structure/secure_safe/caps_spare
|
|
name = "captain's spare ID safe"
|
|
desc = "In case of emergency, do not break glass. All Captains and Acting Captains are provided with codes to access this safe. \
|
|
It is made out of the same material as the station's Black Box and is designed to resist all conventional weaponry. \
|
|
There appears to be a small amount of surface corrosion. It doesn't look like it could withstand much of an explosion.\
|
|
It remains quite flush against the wall, and there only seems to be enough room to fit something as slim as an ID card."
|
|
armor_type = /datum/armor/safe_caps_spare
|
|
max_integrity = 300
|
|
color = "#ffdd33"
|
|
|
|
MAPPING_DIRECTIONAL_HELPERS(/obj/structure/secure_safe/caps_spare, 32)
|
|
|
|
/datum/armor/safe_caps_spare
|
|
melee = 100
|
|
bullet = 100
|
|
laser = 100
|
|
energy = 100
|
|
bomb = 70
|
|
fire = 80
|
|
acid = 70
|
|
|
|
/obj/structure/secure_safe/caps_spare/Initialize(mapload)
|
|
. = ..()
|
|
atom_storage.set_holdable(/obj/item/card/id)
|
|
AddComponent(/datum/component/lockable_storage, \
|
|
lock_code = SSid_access.spare_id_safe_code, \
|
|
can_hack_open = FALSE, \
|
|
)
|
|
|
|
/obj/structure/secure_safe/caps_spare/PopulateContents()
|
|
new /obj/item/card/id/advanced/gold/captains_spare(src)
|
|
|
|
/obj/structure/secure_safe/caps_spare/rust_heretic_act()
|
|
take_damage(damage_amount = 100, damage_type = BRUTE, damage_flag = MELEE, armour_penetration = 100)
|