Files
VMSolidus 890d38bf95 Build Mode Hard Del Fix (#22293)
<img width="376" height="128" alt="image"
src="https://github.com/user-attachments/assets/346bda21-2a87-424b-8072-806bfdaa81d2"
/>

Fixes this hard del, which was triggered by admin commands.
2026-04-23 00:35:03 +00:00

55 lines
1.3 KiB
Plaintext

/datum/build_mode
var/the_default = FALSE
var/name
var/icon_state
var/datum/click_handler/build_mode/host
var/mob/user
/// This variable controls the permissions required to have this build mode added. Mainly used to prevent VV editing from being given to storytellers.
var/permission_requirement
/datum/build_mode/New(var/host)
..()
src.host = host
user = src.host.user
/datum/build_mode/Destroy()
host = null
user = null
. = ..()
/datum/build_mode/proc/OnClick(var/atom/A, var/list/parameters)
return
/datum/build_mode/proc/Configurate()
return
/datum/build_mode/proc/Help()
return
/datum/build_mode/proc/Log(message)
log_admin("BUILD MODE - [name] - [key_name(usr)] - [message]")
/datum/build_mode/proc/Warn(message)
to_chat(user, "BUILD MODE - [name] - [message])")
/datum/build_mode/proc/select_subpath(given_path)
var/desired_path = input("Enter full or partial typepath.","Typepath","[given_path]") as text|null
if(!desired_path)
return
var/list/types = typesof(/atom)
var/list/matches = list()
for(var/path in types)
if(findtext("[path]", desired_path))
matches += path
if(!matches.len)
alert("No results found. Sorry.")
return
if(matches.len==1)
return matches[1]
else
return (input("Select an atom type", "Spawn Atom", matches[1]) as null|anything in matches)