mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
General maintenance for wall mounts (#93534)
## About The Pull Request - Fixes #93392 - Replaces all custom callbacks with call to `deconstruct()`. The callbacks weren't necessary as it did the same thing as `deconstruct()` but in an round about way - Removed duplicate `Initialize()` procs and the params `building` & `ndir` from all wall mounts. Makes everything cleaner ## Changelog 🆑 fix: wall mounts placed by player now falls off when the wall they are mounted on is destroyed code: cleaned up wall mount code /🆑
This commit is contained in:
@@ -104,15 +104,16 @@ 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, stored_lock_code)
|
||||
|
||||
if(!density)
|
||||
find_and_hang_on_wall()
|
||||
AddComponent(/datum/component/lockable_storage, , stored_lock_code)
|
||||
if(mapload)
|
||||
PopulateContents()
|
||||
|
||||
find_and_hang_on_wall()
|
||||
RegisterSignal(src, COMSIG_LOCKABLE_STORAGE_SET_CODE, PROC_REF(update_lock_code))
|
||||
|
||||
/obj/structure/secure_safe/find_and_hang_on_wall()
|
||||
if(!density)
|
||||
return ..()
|
||||
|
||||
/obj/structure/secure_safe/atom_deconstruct(disassembled)
|
||||
if(!density) //if we're a wall item, we'll drop a wall frame.
|
||||
var/obj/item/wallframe/secure_safe/new_safe = new(get_turf(src))
|
||||
|
||||
Reference in New Issue
Block a user