mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-06-08 07:38:19 +01:00
659752e2ea
* tgui the beginning * binaries and the like * Bring in the last of it * Example radio UI * delete example * NTOS Main Menu, start on manifest, tgui states * tasks.json * gunnery ui pt 1 * okay * fix everything * scss update * oops * manifest gigablast * downloader part 1 * download prt 2 * NTOSDownloader final * mfw committing to_worlds * gunnery console pt2 * i cooked * targeting (finished) * one vueui down * voting ui almost done * MY MIND FEELS LIKE AN ARCH ENEMYYYY * voting ui down * photocopier * ntos config + download fixes * photocopier 2 * refactor define * NTOS client manager + fixes * fax machine final (it also uses toner now) * marching forwards... left behind... * ntnrc part 1 * canister * add quotes * portable pumps pt1 + more backgrounds * oops * finish the portable pump * freezers so I'll keep on pushing forward... you haven't seen the last of me... oooooooh... * doors ui pt1 * finish doors UI (forgive me wildkins it's a bit of shitcode) * vitals monitor, make things use labeled lists, new backgrounds * mais j'envoyé aucun mayday... * maglock pt1 * pour ça je me suis perdu... * infrared * fix that * prox sensor pt1 * prox sensor * signaler (this was actually pretty hard) * atmos control pt1 * atmos control pt1.1 * atmos pt 2 * fuel injector * multitool UI * jammer * list viewer * APC * portgen * targeting console updates + SMES ui * new themes, shield generator * supermatter * Add ore detector and (shitty) NTNet Relay * orderterminal pt1 * orderterminal pt2 * smartfridge * Add (air-)tank GUI update ore detector size * Adds Transfer Valves * Add AtmoScrubber * analyzer pt1 * weapons analyzer pt2 * bodyscanner pt1 * bodyscanner pt2 * fix this shitcode * seed storage * appearance changer * appearance changer final * sleeper pt1 * sleeper * gps * vehicles * chem dispenser * lily request * holopad * tgui modules pt1 * ppanel * damage menu * fixes * im here too now * follow menu, search bars * quikpay * quikpay fixes * circuit printer * ppanel * ppanel updates * pai * turret controls (i want to kill myself) * tweak * remove the boardgame * guntracker * implant tracker * penal mechs come close to me, come close to me * chem codex * pai radio * doorjack * pai directives * signaler removal, sensors * ghost spawner * spawnpoint * fixes * teleporter * one more to the chopping block * account database * remove divider * scanner, atmos * latejoin ui pt1 * latejoin * records pt1 * RECORDS UI DONE * delete interpreter & records * CHAT FUCKING CLIENT * data updates * fix some things * final UI, log * basic nanoui fix * antag panel * remove vueui * atm update * vending update * warrants, cameras * ntmonitor * time comes for all * preserve this legacy * bring that back (oops) * rcon, ui auto update for computer UIs, remove rcon computers * alarm monitoring (a bit broke and also todo: add custom alarm monitoring programs to a few consoles) * A LIKE SUPREME * a * power monitor * lights on * fuck this code, fuck nanoui modules, and fuck nanoui * LEAVE IT OH SO FAR BEHIND * fix alarm monitoring for synths * I SAW IN YOU WHAT LIFE WAS MISSING * comms console * idcard and record updates * turn the light on * arcade * pt2 * news browser * static * crusher * f * COULD I JUST SLEIGH THE GOLD FROM THE BALLS? I'M SO FRUSTRATED OH COULD YOU TELL? IF I HEAR ONE MORE VUEUI OR ONE NANOUI I'M GONNA LOSE IT SO LET ME GOOOOOOOOOOOOOOOOO * codeowners & suit sensors * html ui style removal * make lint happy * tgchat * tgpanels pt1 * THE SOUL LONGS FOR OBLIVION!!!!!!!!!!!!!!!!! * figure out why stat isnt working * goodbye ping * shhh * stat updates * An oath sworn in scors! Omni vortex lies! * final almost edits * fix that * last skin adjustments * resist and disorder * i slowly get up and turn off the noise, already fed up... * pleaseeeeeeeeeeeeeee * THE CREDIT LARP IS NECESSARY * i hold the keys * RISE UP * fix that? * harry's suggestions xoxo * runtime fix pt2 * You are the only thing that I still care about * fix runtimes and cl * whoops * misc fixes * fix that too * adds build workflow * f * Update update_tgui.yml * adds some needed steps * ATM * misc fixes and tweaks * fixes 2 * make newscasters usable and fix use power on freezers * turret control is clearer * remove duplicate * makes some verb tabs work properly * makes verbs work properly for real * sans moi * fixes pt2 * fix the chat unnecessarily reloading * fixes * epic * fixes * fix missing consoles --------- Co-authored-by: John Wildkins <john.wildkins@gmail.com> Co-authored-by: Matt Atlas <liermattia@gmail.com> Co-authored-by: harryob <55142896+harryob@users.noreply.github.com> Co-authored-by: Werner <Arrow768@users.noreply.github.com> Co-authored-by: Geeves <ggrobler447@gmail.com> Co-authored-by: harryob <me@harryob.live>
355 lines
13 KiB
Plaintext
355 lines
13 KiB
Plaintext
/proc/togglebuildmode(mob/M as mob in player_list)
|
|
set name = "Toggle Build Mode"
|
|
set category = "Special Verbs"
|
|
if(M.client)
|
|
if(M.client.buildmode)
|
|
log_admin("[key_name(usr)] has left build mode.",admin_key=key_name(usr))
|
|
M.client.buildmode = 0
|
|
M.client.show_popup_menus = 1
|
|
remove_verb(M, /verb/load_template_verb)
|
|
for(var/obj/effect/bmode/buildholder/H)
|
|
if(H.cl == M.client)
|
|
qdel(H)
|
|
else
|
|
log_admin("[key_name(usr)] has entered build mode.",admin_key=key_name(usr))
|
|
M.client.buildmode = 1
|
|
M.client.show_popup_menus = 0
|
|
add_verb(M, /verb/load_template_verb)
|
|
var/obj/effect/bmode/buildholder/H = new/obj/effect/bmode/buildholder()
|
|
var/obj/effect/bmode/builddir/A = new/obj/effect/bmode/builddir(H)
|
|
A.master = H
|
|
var/obj/effect/bmode/buildhelp/B = new/obj/effect/bmode/buildhelp(H)
|
|
B.master = H
|
|
var/obj/effect/bmode/buildmode/C = new/obj/effect/bmode/buildmode(H)
|
|
C.master = H
|
|
var/obj/effect/bmode/buildquit/D = new/obj/effect/bmode/buildquit(H)
|
|
D.master = H
|
|
var/obj/effect/bmode/template/E = new/obj/effect/bmode/template(H)
|
|
E.master = H
|
|
|
|
H.builddir = A
|
|
H.buildhelp = B
|
|
H.buildmode = C
|
|
H.buildquit = D
|
|
H.load_template = E
|
|
M.client.screen += A
|
|
M.client.screen += B
|
|
M.client.screen += C
|
|
M.client.screen += D
|
|
M.client.screen += E
|
|
H.cl = M.client
|
|
|
|
/obj/effect/bmode//Cleaning up the tree a bit
|
|
density = 1
|
|
anchored = 1
|
|
layer = SCREEN_LAYER
|
|
dir = NORTH
|
|
icon = 'icons/misc/buildmode.dmi'
|
|
var/obj/effect/bmode/buildholder/master = null
|
|
|
|
/obj/effect/bmode/Destroy()
|
|
if(master && master.cl)
|
|
master.cl.screen -= src
|
|
master = null
|
|
return ..()
|
|
|
|
/obj/effect/bmode/builddir
|
|
icon_state = "build"
|
|
screen_loc = "NORTH,WEST"
|
|
|
|
/obj/effect/bmode/builddir/Click()
|
|
switch(dir)
|
|
if(NORTH)
|
|
set_dir(EAST)
|
|
if(EAST)
|
|
set_dir(SOUTH)
|
|
if(SOUTH)
|
|
set_dir(WEST)
|
|
if(WEST)
|
|
set_dir(NORTHWEST)
|
|
if(NORTHWEST)
|
|
set_dir(NORTH)
|
|
return 1
|
|
|
|
/obj/effect/bmode/buildhelp
|
|
icon = 'icons/misc/buildmode.dmi'
|
|
icon_state = "buildhelp"
|
|
screen_loc = "NORTH,WEST+1"
|
|
|
|
/obj/effect/bmode/buildhelp/Click()
|
|
switch(master.cl.buildmode)
|
|
if(1)
|
|
to_chat(usr, "<span class='notice'>***********************************************************</span>")
|
|
to_chat(usr, "<span class='notice'>Left Mouse Button = Construct / Upgrade</span>")
|
|
to_chat(usr, "<span class='notice'>Right Mouse Button = Deconstruct / Delete / Downgrade</span>")
|
|
to_chat(usr, "<span class='notice'>Left Mouse Button + ctrl = R-Window</span>")
|
|
to_chat(usr, "<span class='notice'>Left Mouse Button + alt = Airlock</span>")
|
|
to_chat(usr, "")
|
|
to_chat(usr, "<span class='notice'>Use the button in the upper left corner to</span>")
|
|
to_chat(usr, "<span class='notice'>change the direction of built objects.</span>")
|
|
to_chat(usr, "<span class='notice'>***********************************************************</span>")
|
|
if(2)
|
|
to_chat(usr, "<span class='notice'>***********************************************************</span>")
|
|
to_chat(usr, "<span class='notice'>Right Mouse Button on buildmode button = Set object type</span>")
|
|
to_chat(usr, "<span class='notice'>Middle Mouse Button on buildmode button= On/Off object type saying</span>")
|
|
to_chat(usr, "<span class='notice'>Middle Mouse Button on turf/obj = Capture object type</span>")
|
|
to_chat(usr, "<span class='notice'>Left Mouse Button on turf/obj = Place objects</span>")
|
|
to_chat(usr, "<span class='notice'>Right Mouse Button = Delete objects</span>")
|
|
to_chat(usr, "")
|
|
to_chat(usr, "<span class='notice'>Use the button in the upper left corner to</span>")
|
|
to_chat(usr, "<span class='notice'>change the direction of built objects.</span>")
|
|
to_chat(usr, "<span class='notice'>***********************************************************</span>")
|
|
if(3)
|
|
to_chat(usr, "<span class='notice'>***********************************************************</span>")
|
|
to_chat(usr, "<span class='notice'>Right Mouse Button on buildmode button = Select var(type) & value</span>")
|
|
to_chat(usr, "<span class='notice'>Left Mouse Button on turf/obj/mob = Set var(type) & value</span>")
|
|
to_chat(usr, "<span class='notice'>Right Mouse Button on turf/obj/mob = Reset var's value</span>")
|
|
to_chat(usr, "<span class='notice'>***********************************************************</span>")
|
|
if(4)
|
|
to_chat(usr, "<span class='notice'>***********************************************************</span>")
|
|
to_chat(usr, "<span class='notice'>Left Mouse Button on turf/obj/mob = Select</span>")
|
|
to_chat(usr, "<span class='notice'>Right Mouse Button on turf/obj/mob = Throw</span>")
|
|
to_chat(usr, "<span class='notice'>***********************************************************</span>")
|
|
return 1
|
|
|
|
/obj/effect/bmode/buildquit
|
|
icon_state = "buildquit"
|
|
screen_loc = "NORTH,WEST+4"
|
|
|
|
/obj/effect/bmode/buildquit/Click()
|
|
togglebuildmode(master.cl.mob)
|
|
return 1
|
|
|
|
/obj/effect/bmode/buildholder
|
|
density = 0
|
|
anchored = 1
|
|
var/client/cl = null
|
|
var/obj/effect/bmode/builddir/builddir = null
|
|
var/obj/effect/bmode/buildhelp/buildhelp = null
|
|
var/obj/effect/bmode/buildmode/buildmode = null
|
|
var/obj/effect/bmode/buildquit/buildquit = null
|
|
var/obj/effect/bmode/template/load_template = null
|
|
var/atom/movable/throw_atom = null
|
|
|
|
/obj/effect/bmode/buildholder/Destroy()
|
|
qdel(builddir)
|
|
builddir = null
|
|
qdel(buildhelp)
|
|
buildhelp = null
|
|
qdel(buildmode)
|
|
buildmode = null
|
|
qdel(buildquit)
|
|
buildquit = null
|
|
throw_atom = null
|
|
cl = null
|
|
return ..()
|
|
|
|
/obj/effect/bmode/template
|
|
icon_state = "load_template"
|
|
screen_loc = "NORTH,WEST+2"
|
|
|
|
/obj/effect/bmode/template/Click()
|
|
load_template(usr)
|
|
return 1
|
|
|
|
/obj/effect/bmode/buildmode
|
|
icon_state = "buildmode1"
|
|
screen_loc = "NORTH,WEST+3"
|
|
var/varholder = "name"
|
|
var/valueholder = "derp"
|
|
var/objholder = /obj/structure/closet
|
|
var/objsay = 1
|
|
|
|
/obj/effect/bmode/buildmode/Click(location, control, params)
|
|
var/list/pa = params2list(params)
|
|
|
|
if(pa.Find("middle"))
|
|
switch(master.cl.buildmode)
|
|
if(2)
|
|
objsay=!objsay
|
|
|
|
|
|
if(pa.Find("left"))
|
|
switch(master.cl.buildmode)
|
|
if(1)
|
|
master.cl.buildmode = 2
|
|
src.icon_state = "buildmode2"
|
|
if(2)
|
|
master.cl.buildmode = 3
|
|
src.icon_state = "buildmode3"
|
|
if(3)
|
|
master.cl.buildmode = 4
|
|
src.icon_state = "buildmode4"
|
|
if(4)
|
|
master.cl.buildmode = 1
|
|
src.icon_state = "buildmode1"
|
|
|
|
else if(pa.Find("right"))
|
|
switch(master.cl.buildmode)
|
|
if(1)
|
|
return 1
|
|
if(2)
|
|
objholder = text2path(input(usr,"Enter typepath:" ,"Typepath","/obj/structure/closet"))
|
|
if(!ispath(objholder))
|
|
objholder = /obj/structure/closet
|
|
alert("That path is not allowed.")
|
|
else
|
|
if(ispath(objholder,/mob) && !check_rights(R_DEBUG,0))
|
|
objholder = /obj/structure/closet
|
|
if(3)
|
|
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine")
|
|
|
|
master.buildmode.varholder = input(usr,"Enter variable name:" ,"Name", "name")
|
|
if(master.buildmode.varholder in locked && !check_rights(R_DEBUG,0))
|
|
return 1
|
|
var/thetype = input(usr,"Select variable type:" ,"Type") in list("text","number","mob-reference","obj-reference","turf-reference")
|
|
if(!thetype) return 1
|
|
switch(thetype)
|
|
if("text")
|
|
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", "value") as text
|
|
if("number")
|
|
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", 123) as num
|
|
if("mob-reference")
|
|
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as mob in mob_list
|
|
if("obj-reference")
|
|
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as obj in world
|
|
if("turf-reference")
|
|
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as turf in world
|
|
return 1
|
|
|
|
/proc/build_click(var/mob/user, buildmode, params, var/obj/object)
|
|
var/obj/effect/bmode/buildholder/holder = null
|
|
for(var/obj/effect/bmode/buildholder/H)
|
|
if(H.cl == user.client)
|
|
holder = H
|
|
break
|
|
if(!holder) return
|
|
var/list/pa = params2list(params)
|
|
|
|
switch(buildmode)
|
|
if(1)
|
|
if(istype(object,/turf) && pa.Find("left") && !pa.Find("alt") && !pa.Find("ctrl") )
|
|
if(istype(object,/turf/space))
|
|
var/turf/T = object
|
|
T.ChangeTurf(/turf/simulated/floor)
|
|
return
|
|
else if(istype(object,/turf/simulated/floor))
|
|
var/turf/T = object
|
|
T.ChangeTurf(/turf/simulated/wall)
|
|
return
|
|
else if(istype(object,/turf/simulated/wall))
|
|
var/turf/T = object
|
|
T.ChangeTurf(/turf/simulated/wall/r_wall)
|
|
return
|
|
else if(pa.Find("right"))
|
|
if(istype(object,/turf/simulated/wall))
|
|
var/turf/T = object
|
|
T.ChangeTurf(/turf/simulated/floor)
|
|
return
|
|
else if(istype(object,/turf/simulated/floor))
|
|
var/turf/T = object
|
|
T.ChangeTurf(/turf/space)
|
|
return
|
|
else if(istype(object,/turf/simulated/wall/r_wall))
|
|
var/turf/T = object
|
|
T.ChangeTurf(/turf/simulated/wall)
|
|
return
|
|
else if(istype(object,/obj))
|
|
qdel(object)
|
|
return
|
|
else if(istype(object,/turf) && pa.Find("alt") && pa.Find("left"))
|
|
new/obj/machinery/door/airlock(get_turf(object))
|
|
else if(istype(object,/turf) && pa.Find("ctrl") && pa.Find("left"))
|
|
switch(holder.builddir.dir)
|
|
if(NORTH)
|
|
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
|
|
WIN.set_dir(NORTH)
|
|
if(SOUTH)
|
|
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
|
|
WIN.set_dir(SOUTH)
|
|
if(EAST)
|
|
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
|
|
WIN.set_dir(EAST)
|
|
if(WEST)
|
|
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
|
|
WIN.set_dir(WEST)
|
|
if(NORTHWEST)
|
|
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
|
|
WIN.set_dir(NORTHWEST)
|
|
if(2)
|
|
if(pa.Find("left"))
|
|
if(ispath(holder.buildmode.objholder,/turf))
|
|
var/turf/T = get_turf(object)
|
|
T.ChangeTurf(holder.buildmode.objholder)
|
|
else
|
|
var/obj/A = new holder.buildmode.objholder (get_turf(object))
|
|
A.set_dir(holder.builddir.dir)
|
|
else if(pa.Find("right"))
|
|
if(isobj(object)) qdel(object)
|
|
if(pa.Find("middle"))
|
|
holder.buildmode.objholder = text2path("[object.type]")
|
|
if(holder.buildmode.objsay) to_chat(usr, "[object.type]")
|
|
|
|
|
|
if(3)
|
|
if(pa.Find("left")) //I cant believe this shit actually compiles.
|
|
if(object.vars.Find(holder.buildmode.varholder))
|
|
log_admin("[key_name(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]",admin_key=key_name(usr))
|
|
object.vars[holder.buildmode.varholder] = holder.buildmode.valueholder
|
|
else
|
|
to_chat(usr, "<span class='warning'>[initial(object.name)] does not have a var called '[holder.buildmode.varholder]'</span>")
|
|
if(pa.Find("right"))
|
|
if(object.vars.Find(holder.buildmode.varholder))
|
|
log_admin("[key_name(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]",admin_key=key_name(usr))
|
|
object.vars[holder.buildmode.varholder] = initial(object.vars[holder.buildmode.varholder])
|
|
else
|
|
to_chat(usr, "<span class='warning'>[initial(object.name)] does not have a var called '[holder.buildmode.varholder]'</span>")
|
|
|
|
if(4)
|
|
if(pa.Find("left"))
|
|
if(istype(object, /atom/movable))
|
|
holder.throw_atom = object
|
|
if(pa.Find("right"))
|
|
if(holder.throw_atom)
|
|
holder.throw_atom.throw_at(object, 10, 1)
|
|
log_admin("[key_name(usr)] threw [holder.throw_atom] at [object]",admin_key=key_name(usr))
|
|
|
|
/verb/load_template_verb()
|
|
set name = "Load Template"
|
|
set category = "Special Verbs"
|
|
if(!usr)
|
|
return
|
|
load_template(usr)
|
|
|
|
/proc/load_template(var/mob/user)
|
|
if(!user)
|
|
return
|
|
|
|
if(!check_rights(R_SPAWN))
|
|
return
|
|
|
|
var/list/templates
|
|
try
|
|
templates = json_decode(return_file_text("config/templates_list.json"))
|
|
catch(var/exception/ej)
|
|
log_debug("Warning: Could not load the templates config as templates_list.json is missing - [ej]")
|
|
return
|
|
|
|
if(!templates || !templates["templates_list"] || templates["templates_folder"] == "")
|
|
return
|
|
|
|
var/turf/T = get_turf(user)
|
|
var/name = input(user, "Which template would you like to load?", "Load Template", null) as null|anything in templates["templates_list"]
|
|
|
|
if (!name || !T)
|
|
return
|
|
|
|
var/datum/map_template/maploader = new (templates["templates_folder"] + name, name)
|
|
if (!maploader)
|
|
log_debug("Error, unable to load maploader in proc load_template!")
|
|
return
|
|
|
|
var/centered = input(user, "Do you want template to load as center or Edge?", "Load Template", null) as null|anything in list("Center", "Edge")
|
|
maploader.load(T, centered == "Center" ? TRUE : FALSE)
|
|
log_and_message_admins("[key_name_admin(user)] has loaded template [name].", user, T)
|