everything but mob stuff
This commit is contained in:
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
|
||||
Ok. so a quick rundown on how to make a program. This is kind of a shitty documentation, but oh well I was asked to.
|
||||
|
||||
|
||||
This is how the base program is setup. the rest is mostly tgui stuff. I'll use the ntnetmonitor as a base
|
||||
|
||||
/datum/computer_file/program/ntnetmonitor
|
||||
filename = "ntmonitor" <- This is obviously the name of the file itself. not much to be said
|
||||
filedesc = "NTNet Diagnostics and Monitoring" <- This sort of the official name. it's what shows up on the main menu
|
||||
program_icon_state = "comm_monitor" <- This is what the screen will look like when the program is active
|
||||
extended_desc = "This program is a dummy. <- This is a sort of description, visible when looking on the ntnet
|
||||
size = 12 <- size of the program. Big programs need more hard drive space. Don't make it too big though.
|
||||
requires_ntnet = 1 <- if this is set, the program will not run and will close if ntnet connection is lost. mainly for primarily online programs.
|
||||
required_access = access_network <- This is access required to run the program itself. ONLY SET THIS FOR SUPER SECURE SHIT. This also acts as transfer_access as well.
|
||||
transfer_access = access_change_ids <- this is the access needed to download from ntnet or host on the ptp program. This is what you want to use most of the time.
|
||||
available_on_ntnet = 1 <- If it's available to download on ntnet. pretty self explanatory.
|
||||
available_on_syndinet = 0 <- ditto but on emagged syndie net. Use this for antag programs
|
||||
usage_flags = PROGRAM_ALL // Bitflags (PROGRAM_CONSOLE, PROGRAM_LAPTOP, PROGRAM_TABLET combination) or PROGRAM_ALL
|
||||
^^- The comment above sorta explains it. Use this to limit what kind of machines can run the program. For example, comms program should be limited to consoles and laptops.
|
||||
var/ui_header = "downloader_finished.gif" <- this one is kinda cool. If you have the program minimized, this will show up in the header of the computer screen.
|
||||
you can even have the program change what the header is based on the situation! see alarm.dm for an example.
|
||||
|
||||
|
||||
Now. for pre-installing stuff.
|
||||
|
||||
Primarily done for consoles, there's an install_programs() proc in the console presets file in the machines folder.
|
||||
|
||||
for example, the command console one.
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/command/install_programs()
|
||||
cpu.hard_drive.store_file(new/datum/computer_file/program/chatclient())
|
||||
cpu.hard_drive.store_file(new/datum/computer_file/program/card_mod())
|
||||
|
||||
Basically, you want to do cpu.hard_drive.store_file(new/*program path here*()) and put it in the subtype's install_programs().
|
||||
Probably pretty self explanatory, but just in case.
|
||||
|
||||
Will probably be expanded when new features come around or I get asked to mention something.
|
||||
|
||||
*/
|
||||
@@ -13,7 +13,7 @@
|
||||
ui_y = 400
|
||||
var/last_status = SUPERMATTER_INACTIVE
|
||||
var/list/supermatters
|
||||
var/obj/machinery/power/supermatter_shard/active // Currently selected supermatter crystal.
|
||||
var/obj/machinery/power/supermatter_crystal/active // Currently selected supermatter crystal.
|
||||
|
||||
|
||||
/datum/computer_file/program/supermatter_monitor/process_tick()
|
||||
@@ -41,7 +41,7 @@
|
||||
var/turf/T = get_turf(ui_host())
|
||||
if(!T)
|
||||
return
|
||||
for(var/obj/machinery/power/supermatter_shard/S in GLOB.machines)
|
||||
for(var/obj/machinery/power/supermatter_crystal/S in GLOB.machines)
|
||||
// Delaminating, not within coverage, not on a tile.
|
||||
if (!isturf(S.loc) || !(is_station_level(S.z) || is_mining_level(S.z) || S.z == T.z))
|
||||
continue
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
/datum/computer_file/program/supermatter_monitor/proc/get_status()
|
||||
. = SUPERMATTER_INACTIVE
|
||||
for(var/obj/machinery/power/supermatter_shard/S in supermatters)
|
||||
for(var/obj/machinery/power/supermatter_crystal/S in supermatters)
|
||||
. = max(., S.get_status())
|
||||
|
||||
/datum/computer_file/program/supermatter_monitor/ui_data()
|
||||
@@ -93,7 +93,7 @@
|
||||
data["gases"] = gasdata
|
||||
else
|
||||
var/list/SMS = list()
|
||||
for(var/obj/machinery/power/supermatter_shard/S in supermatters)
|
||||
for(var/obj/machinery/power/supermatter_crystal/S in supermatters)
|
||||
var/area/A = get_area(S)
|
||||
if(A)
|
||||
SMS.Add(list(list(
|
||||
@@ -120,7 +120,7 @@
|
||||
return TRUE
|
||||
if("PRG_set")
|
||||
var/newuid = text2num(params["target"])
|
||||
for(var/obj/machinery/power/supermatter_shard/S in supermatters)
|
||||
for(var/obj/machinery/power/supermatter_crystal/S in supermatters)
|
||||
if(S.uid == newuid)
|
||||
active = S
|
||||
return TRUE
|
||||
Reference in New Issue
Block a user