module things, jfc

This commit is contained in:
Poojawa
2018-09-11 07:51:01 -05:00
parent 8b9ef1e400
commit 284e9d0325
695 changed files with 11343 additions and 5661 deletions
@@ -1,9 +1,9 @@
/obj/machinery/modular_computer/console/preset
// Can be changed to give devices specific hardware
var/_has_id_slot = 0
var/_has_printer = 0
var/_has_battery = 0
var/_has_ai = 0
var/_has_id_slot = FALSE
var/_has_printer = FALSE
var/_has_battery = FALSE
var/_has_ai = FALSE
/obj/machinery/modular_computer/console/preset/Initialize()
. = ..()
@@ -29,9 +29,9 @@
// ===== ENGINEERING CONSOLE =====
/obj/machinery/modular_computer/console/preset/engineering
console_department = "Engineering"
name = "engineering console"
desc = "A stationary computer. This one comes preloaded with engineering programs."
console_department = "Engineering"
name = "engineering console"
desc = "A stationary computer. This one comes preloaded with engineering programs."
/obj/machinery/modular_computer/console/preset/engineering/install_programs()
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
@@ -41,10 +41,10 @@
// ===== RESEARCH CONSOLE =====
/obj/machinery/modular_computer/console/preset/research
console_department = "Research"
name = "research director's console"
desc = "A stationary computer. This one comes preloaded with research programs."
_has_ai = 1
console_department = "Research"
name = "research director's console"
desc = "A stationary computer. This one comes preloaded with research programs."
_has_ai = TRUE
/obj/machinery/modular_computer/console/preset/research/examine(mob/user)
..()
@@ -60,11 +60,11 @@
// ===== COMMAND CONSOLE =====
/obj/machinery/modular_computer/console/preset/command
console_department = "Command"
name = "command console"
desc = "A stationary computer. This one comes preloaded with command programs."
_has_id_slot = 1
_has_printer = 1
console_department = "Command"
name = "command console"
desc = "A stationary computer. This one comes preloaded with command programs."
_has_id_slot = TRUE
_has_printer = TRUE
/obj/machinery/modular_computer/console/preset/command/examine(mob/user)
..()
@@ -77,9 +77,9 @@
// ===== CIVILIAN CONSOLE =====
/obj/machinery/modular_computer/console/preset/civilian
console_department = "Civilian"
name = "civilian console"
desc = "A stationary computer. This one comes preloaded with generic programs."
console_department = "Civilian"
name = "civilian console"
desc = "A stationary computer. This one comes preloaded with generic programs."
/obj/machinery/modular_computer/console/preset/civilian/install_programs()
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
+49 -20
View File
@@ -1,32 +1,62 @@
# Modular computer programs
#Modular computer programs
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.
## Base setup
This is how the base program is setup. the rest is mostly tgui stuff. I'll use the ntnetmonitor as a base
This is how the base program is setup. the rest is mostly tgui stuff. I'll use the ntnetmonitor as a base
```DM
/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 is 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 a 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 without an ntnet connection, and will close if the 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.
/// This is obviously the name of the file itself. not much to be said
filename = "ntmonitor"
/// This is sort of the official name. it's what shows up on the main menu
filedesc = "NTNet Diagnostics and Monitoring"
/// This is what the screen will look like when the program is active
program_icon_state = "comm_monitor"
/// This is a sort of a description, visible when looking on the ntnet
extended_desc = "This program is a dummy."
/// size of the program. Big programs need more hard drive space. Don't
/// make it too big though.
size = 12
/// If this is set, the program will not run without an ntnet connection,
/// and will close if the connection is lost. Mainly for primarily online
/// programs.
requires_ntnet = 1
/// This is access required to run the program itself. ONLY SET THIS FOR
/// SUPER SECURE SHIT. This also acts as transfer_access as well.
required_access = access_network
/// 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.
transfer_access = access_change_ids
/// If it's available to download on ntnet. pretty self explanatory.
available_on_ntnet = 1
/// ditto but on emagged syndie net. Use this for antag programs
available_on_syndinet = 0
/// Bitflags (PROGRAM_CONSOLE, PROGRAM_LAPTOP, PROGRAM_TABLET combination)
/// or PROGRAM_ALL. Use this to limit what kind of machines can run the
/// program. For example, comms program should be limited to consoles and laptops.
usage_flags = PROGRAM_ALL
/// 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.
var/ui_header = "downloader_finished.gif"
```
##Preinstalls
## Preinstalls
Now. for pre-installing stuff.
Primarily done for consoles, there's an install_programs() proc in the console presets file in the machines folder.
@@ -42,4 +72,3 @@ Basically, you want to do cpu.hard_drive.store_file(new/*program path here*())
Probably pretty self explanatory, but just in case.
Will probably be expanded when new features come around or I get asked to mention something.
@@ -34,7 +34,7 @@
if(!message || !channel)
return
channel.add_message(message, username)
log_talk(user,"[key_name(user)] as [username] sent to [channel.title]: [message]",LOGCHAT)
user.log_talk(message, LOG_CHAT, tag="as [username] to channel [channel.title]")
if("PRG_joinchannel")
. = 1