mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-11 16:07:36 +01:00
4ecb0bc21c
Repaths obj/machinery to obj/structure/machinery. **Note for reviewers:** the only meaningful changed code exists within **code/game/objects/structures.dm** and **code/game/objects/structures/_machinery.dm**, largely concerning damage procs. With the exception of moving airlock defines to their own file, ALL OTHER CHANGES ARE STRICTLY PATH CHANGES. Objects, _categorically_, are largely divided between those you can hold in your hand/inventory and those you can't. Machinery objects are already subtypes of Structures behaviorally, this PR just makes their pathing reflect that, and allows for future work (tool actions, more health/destruction functionality) to be developed without unnecessary code duplication. I have tested this PR by loading up the Horizon and dismantling various machines and structures with tools, shooting guns of various types throughout the ship, and detonating a bunch of explosions throughout the ship.
43 lines
1.5 KiB
Plaintext
43 lines
1.5 KiB
Plaintext
/obj/structure/machinery/acting/wardrobe
|
|
name = "wardrobe dispenser"
|
|
desc = "A machine that dispenses holo-clothing for those in need."
|
|
icon = 'icons/obj/vending.dmi'
|
|
icon_state = "cart"
|
|
anchored = 1
|
|
density = 1
|
|
var/active = 1
|
|
|
|
/obj/structure/machinery/acting/wardrobe/attack_hand(var/mob/user as mob)
|
|
user.show_message("You push a button and watch patiently as the machine begins to hum.")
|
|
if(active)
|
|
active = 0
|
|
spawn(30)
|
|
new /obj/item/storage/box/syndie_kit/chameleon(src.loc)
|
|
src.visible_message("\The [src] beeps, dispensing a small box onto the floor.", "You hear a beeping sound followed by a thumping noise of some kind.")
|
|
active = 1
|
|
|
|
/obj/structure/machinery/acting/changer
|
|
name = "Quickee's Plastic Surgeon"
|
|
desc = "For when you need to be someone else right now."
|
|
icon = 'icons/obj/surgery.dmi'
|
|
icon_state = "bioprinter"
|
|
anchored = 1
|
|
density = 1
|
|
|
|
/obj/structure/machinery/acting/changer/attack_hand(var/mob/living/carbon/human/H)
|
|
if(!istype(H))
|
|
return
|
|
|
|
H.change_appearance(APPEARANCE_ALL, H, TRUE, H.generate_valid_species(), null, ui_state = GLOB.default_state, state_object = src, update_id = TRUE)
|
|
var/getName = sanitizeName(sanitize_readd_odd_symbols(sanitize(input(H, "Would you like to change your name to something else?", "Name change") as null|text)))
|
|
if(getName)
|
|
H.real_name = getName
|
|
H.name = getName
|
|
H.dna.real_name = getName
|
|
if(H.mind)
|
|
H.mind.name = H.name
|
|
var/obj/item/card/id/ID = H.GetIdCard()
|
|
if(ID)
|
|
ID.registered_name = H.real_name
|
|
ID.update_name()
|