Files
silicons 08c895db65 mech part repath (#7009)
Tears apart the overloaded `/obj/item/mecha_parts` into a few different
paths.

`/obj/item/vehicle_chassis` for the base part that things attach on
(this is the mech construction holder)
`/obj/item/vehicle_part` for things you attach to chassis
`/obj/item/vehicle_component` for integral components
`/obj/item/vehicle_module` for equipment

This is to prepare for further work on mecha as a system, and to get
some of the massive line changes out of the way.

Also:

- tears apart a few files that were just too long to be handled and
groups everything with their mechs
- erases some code reuse
2025-02-25 11:36:22 -07:00

30 lines
1.4 KiB
Plaintext

/var/create_object_html = null
/datum/admins/proc/create_object(var/mob/user)
if (!create_object_html)
var/objectjs = null
objectjs = jointext(typesof(/obj), ";")
create_object_html = file2text('html/create_object.html')
create_object_html = replacetext(create_object_html, "null /* object types */", "\"[objectjs]\"")
user << browse(replacetext(create_object_html, "/* ref src */", "\ref[src]"), "window=create_object;size=425x475")
/datum/admins/proc/quick_create_object(var/mob/user)
var/quick_create_object_html = null
var/pathtext = null
pathtext = input("Select the path of the object you wish to create.", "Path", "/obj") as null|anything in list("/obj","/obj/structure","/obj/item","/obj/item","/obj/item","/obj/item/gun","/obj/item/reagent_containers","/obj/item/reagent_containers/food","/obj/item/clothing","/obj/machinery","/obj/vehicle/sealed/mecha","/obj/item/vehicle_part","/obj/vehicle/sealed/mecha_parts/mecha_equipement","/obj/item/storage/box/fluff")
if(!pathtext)
return
var path = text2path(pathtext)
if (!quick_create_object_html)
var/objectjs = null
objectjs = jointext(typesof(path), ";")
quick_create_object_html = file2text('html/create_object.html')
quick_create_object_html = replacetext(quick_create_object_html, "null /* object types */", "\"[objectjs]\"")
user << browse(replacetext(quick_create_object_html, "/* ref src */", "\ref[src]"), "window=quick_create_object;size=425x475")