Updates Part Twelve

This commit is contained in:
Unknown
2019-04-14 14:38:30 -04:00
parent 042720823a
commit 7594c28f21
56 changed files with 1074 additions and 205 deletions

View File

@@ -113,6 +113,7 @@
#define MAX_RECORD_LENGTH 24576
#define MAX_LNAME_LEN 64
#define MAX_NAME_LEN 52
#define MAX_TEXTFILE_LENGTH 128000 // 512GQ file
// Event defines.
#define EVENT_LEVEL_MUNDANE 1

View File

@@ -11,6 +11,7 @@
#define log_world(message) world.log << message
#define to_file(file_entry, source_var) file_entry << source_var
#define from_file(file_entry, target_var) file_entry >> target_var
#define show_browser(target, browser_content, browser_name) target << browse(browser_content, browser_name)
// From TG, might be useful to have.
// Didn't port SEND_TEXT() since to_chat() appears to serve the same purpose.

View File

@@ -289,3 +289,151 @@
if(ValidTeslaLinks[metadata[7]])
var/t = ValidTeslaLinks[metadata[7]]
I.tesla_link = new t(I)
/datum/gear_tweak/laptop
var/list/ValidProcessors = list(/obj/item/weapon/computer_hardware/processor_unit/small, /obj/item/weapon/computer_hardware/processor_unit)
var/list/ValidBatteries = list(/obj/item/weapon/computer_hardware/battery_module, /obj/item/weapon/computer_hardware/battery_module/advanced, /obj/item/weapon/computer_hardware/battery_module/super)
var/list/ValidHardDrives = list(/obj/item/weapon/computer_hardware/hard_drive, /obj/item/weapon/computer_hardware/hard_drive/advanced, /obj/item/weapon/computer_hardware/hard_drive/super)
var/list/ValidNetworkCards = list(/obj/item/weapon/computer_hardware/network_card, /obj/item/weapon/computer_hardware/network_card/advanced)
var/list/ValidNanoPrinters = list(null, /obj/item/weapon/computer_hardware/nano_printer)
var/list/ValidCardSlots = list(null, /obj/item/weapon/computer_hardware/card_slot)
var/list/ValidTeslaLinks = list(null, /obj/item/weapon/computer_hardware/tesla_link)
/datum/gear_tweak/laptop/get_contents(var/list/metadata)
var/list/names = list()
var/obj/O = ValidProcessors[metadata[1]]
if(O)
names += initial(O.name)
O = ValidBatteries[metadata[2]]
if(O)
names += initial(O.name)
O = ValidHardDrives[metadata[3]]
if(O)
names += initial(O.name)
O = ValidNetworkCards[metadata[4]]
if(O)
names += initial(O.name)
O = ValidNanoPrinters[metadata[5]]
if(O)
names += initial(O.name)
O = ValidCardSlots[metadata[6]]
if(O)
names += initial(O.name)
O = ValidTeslaLinks[metadata[7]]
if(O)
names += initial(O.name)
return "[english_list(names, and_text = ", ")]"
/datum/gear_tweak/laptop/get_metadata(var/user, var/metadata)
. = list()
var/list/names = list()
var/counter = 1
for(var/i in ValidProcessors)
if(i)
var/obj/O = i
names[initial(O.name)] = counter++
else
names["None"] = counter++
var/entry = input(user, "Choose a processor.", "Character Preference") in names
. += names[entry]
names = list()
counter = 1
for(var/i in ValidBatteries)
if(i)
var/obj/O = i
names[initial(O.name)] = counter++
else
names["None"] = counter++
entry = input(user, "Choose a battery.", "Character Preference") in names
. += names[entry]
names = list()
counter = 1
for(var/i in ValidHardDrives)
if(i)
var/obj/O = i
names[initial(O.name)] = counter++
else
names["None"] = counter++
entry = input(user, "Choose a hard drive.", "Character Preference") in names
. += names[entry]
names = list()
counter = 1
for(var/i in ValidNetworkCards)
if(i)
var/obj/O = i
names[initial(O.name)] = counter++
else
names["None"] = counter++
entry = input(user, "Choose a network card.", "Character Preference") in names
. += names[entry]
names = list()
counter = 1
for(var/i in ValidNanoPrinters)
if(i)
var/obj/O = i
names[initial(O.name)] = counter++
else
names["None"] = counter++
entry = input(user, "Choose a nanoprinter.", "Character Preference") in names
. += names[entry]
names = list()
counter = 1
for(var/i in ValidCardSlots)
if(i)
var/obj/O = i
names[initial(O.name)] = counter++
else
names["None"] = counter++
entry = input(user, "Choose a card slot.", "Character Preference") in names
. += names[entry]
names = list()
counter = 1
for(var/i in ValidTeslaLinks)
if(i)
var/obj/O = i
names[initial(O.name)] = counter++
else
names["None"] = counter++
entry = input(user, "Choose a tesla link.", "Character Preference") in names
. += names[entry]
/datum/gear_tweak/laptop/get_default()
return list(1, 1, 1, 1, 1, 1, 1)
/datum/gear_tweak/laptop/tweak_item(var/obj/item/modular_computer/laptop/preset/I, var/list/metadata)
if(ValidProcessors[metadata[1]])
var/t = ValidProcessors[metadata[1]]
I.processor_unit = new t(I)
if(ValidBatteries[metadata[2]])
var/t = ValidBatteries[metadata[2]]
I.battery_module = new t(I)
I.battery_module.charge_to_full()
if(ValidHardDrives[metadata[3]])
var/t = ValidHardDrives[metadata[3]]
I.hard_drive = new t(I)
if(ValidNetworkCards[metadata[4]])
var/t = ValidNetworkCards[metadata[4]]
I.network_card = new t(I)
if(ValidNanoPrinters[metadata[5]])
var/t = ValidNanoPrinters[metadata[5]]
I.nano_printer = new t(I)
if(ValidCardSlots[metadata[6]])
var/t = ValidCardSlots[metadata[6]]
I.card_slot = new t(I)
if(ValidTeslaLinks[metadata[7]])
var/t = ValidTeslaLinks[metadata[7]]
I.tesla_link = new t(I)

View File

@@ -158,23 +158,47 @@
..()
gear_tweaks = list(gear_tweak_free_color_choice)
/****************
modular computers
****************/
/datum/gear/utility/cheaptablet
display_name = "cheap tablet computer"
display_name = "tablet computer: cheap"
display_name = "tablet computer, cheap"
path = /obj/item/modular_computer/tablet/preset/custom_loadout/cheap
cost = 3
/datum/gear/utility/normaltablet
display_name = "tablet computer"
display_name = "tablet computer: advanced"
display_name = "tablet computer, advanced"
path = /obj/item/modular_computer/tablet/preset/custom_loadout/advanced
cost = 4
/datum/gear/utility/customtablet
display_name = "tablet computer: custom"
display_name = "tablet computer, custom"
path = /obj/item/modular_computer/tablet
cost = 4
/datum/gear/utility/customtablet/New()
..()
gear_tweaks += new /datum/gear_tweak/tablet()
gear_tweaks += new /datum/gear_tweak/tablet()
/datum/gear/utility/cheaplaptop
display_name = "laptop computer, cheap"
path = /obj/item/modular_computer/laptop/preset/custom_loadout/cheap
cost = 4
/datum/gear/utility/normallaptop
display_name = "laptop computer, advanced"
path = /obj/item/modular_computer/laptop/preset/custom_loadout/advanced
cost = 5
/datum/gear/utility/customlaptop
display_name = "laptop computer, custom"
path = /obj/item/modular_computer/laptop/preset/
cost = 6
/datum/gear/utility/customlaptop/New()
..()
gear_tweaks += new /datum/gear_tweak/laptop()

View File

@@ -82,6 +82,8 @@
set_light(light_strength)
if(active_program)
overlays.Add(active_program.program_icon_state ? active_program.program_icon_state : icon_state_menu)
if(active_program.program_key_state)
overlays.Add(active_program.program_key_state)
else
overlays.Add(icon_state_menu)

View File

@@ -136,7 +136,7 @@
update_uis()
to_chat(user, "You insert \the [I] into \the [src].")
return
if(istype(W, /obj/item/weapon/paper))
if(istype(W, /obj/item/weapon/paper) || istype(W, /obj/item/weapon/paper_bundle))
if(!nano_printer)
return
nano_printer.attackby(W, user)

View File

@@ -31,6 +31,7 @@
var/list/program = list()
program["name"] = P.filename
program["desc"] = P.filedesc
program["icon"] = P.program_menu_icon
program["autorun"] = (istype(autorun) && (autorun.stored_data == P.filename)) ? 1 : 0
if(P in idle_threads)
program["running"] = 1

View File

@@ -34,4 +34,4 @@
icon_state = icon_state_closed
/obj/item/modular_computer/laptop/preset
anchored = FALSE
anchored = FALSE

View File

@@ -8,4 +8,9 @@
hardware_flag = PROGRAM_TABLET
max_hardware_size = 1
w_class = ITEMSIZE_SMALL
light_strength = 2 // Same as PDAs
light_strength = 2 // Same as PDAs
/obj/item/modular_computer/tablet/lease
desc = "A small portable microcomputer. This one has a gold and blue stripe, and a serial number stamped into the case."
icon_state = "tabletsol"
icon_state_unpowered = "tabletsol"

View File

@@ -1,6 +1,6 @@
/obj/item/modular_computer/telescreen
name = "telescreen"
desc = "A stationary wall-mounted touchscreen"
desc = "A wall-mounted touchscreen computer."
icon = 'icons/obj/modular_telescreen.dmi'
icon_state = "telescreen"
icon_state_unpowered = "telescreen"

View File

@@ -20,6 +20,7 @@
..()
hard_drive.store_file(new/datum/computer_file/program/suit_sensors())
hard_drive.store_file(new/datum/computer_file/program/camera_monitor())
hard_drive.store_file(new/datum/computer_file/program/wordprocessor())
set_autorun("sensormonitor")
// Research
@@ -35,6 +36,7 @@
hard_drive.store_file(new/datum/computer_file/program/camera_monitor())
//hard_drive.store_file(new/datum/computer_file/program/aidiag())
hard_drive.store_file(new/datum/computer_file/program/email_client())
hard_drive.store_file(new/datum/computer_file/program/wordprocessor())
// Administrator
/obj/item/modular_computer/console/preset/sysadmin/install_default_hardware()
@@ -50,6 +52,7 @@
//hard_drive.store_file(new/datum/computer_file/program/aidiag())
hard_drive.store_file(new/datum/computer_file/program/email_client())
hard_drive.store_file(new/datum/computer_file/program/email_administration())
hard_drive.store_file(new/datum/computer_file/program/wordprocessor())
// Command
/obj/item/modular_computer/console/preset/command/install_default_hardware()
@@ -70,6 +73,7 @@
..()
hard_drive.store_file(new/datum/computer_file/program/camera_monitor())
hard_drive.store_file(new/datum/computer_file/program/digitalwarrant())
hard_drive.store_file(new/datum/computer_file/program/wordprocessor())
// Civilian
/obj/item/modular_computer/console/preset/civilian/install_default_programs()
@@ -79,6 +83,7 @@
hard_drive.store_file(new/datum/computer_file/program/newsbrowser())
hard_drive.store_file(new/datum/computer_file/program/camera_monitor())
hard_drive.store_file(new/datum/computer_file/program/email_client())
hard_drive.store_file(new/datum/computer_file/program/wordprocessor())
// ERT
/obj/item/modular_computer/console/preset/ert/install_default_hardware()
@@ -114,4 +119,14 @@
// Merchant
/obj/item/modular_computer/console/preset/merchant/install_default_programs()
..()
//hard_drive.store_file(new/datum/computer_file/program/merchant())
//hard_drive.store_file(new/datum/computer_file/program/merchant())
hard_drive.store_file(new/datum/computer_file/program/wordprocessor())
// Library
/obj/item/modular_computer/console/preset/library/install_default_programs()
..()
hard_drive.store_file(new/datum/computer_file/program/nttransfer())
hard_drive.store_file(new/datum/computer_file/program/newsbrowser())
hard_drive.store_file(new/datum/computer_file/program/email_client())
hard_drive.store_file(new/datum/computer_file/program/wordprocessor())
hard_drive.store_file(new/datum/computer_file/program/library())

View File

@@ -12,6 +12,8 @@
var/filedesc = "Unknown Program" // User-friendly name of this program.
var/extended_desc = "N/A" // Short description of this program's function.
var/program_icon_state = null // Program-specific screen icon state
var/program_key_state = "standby_key" // Program-specific keyboard icon state
var/program_menu_icon = "newwin" // Icon to use for program's link in main menu
var/requires_ntnet = 0 // Set to 1 for program to require nonstop NTNet connection to run. If NTNet connection is lost program crashes.
var/requires_ntnet_feature = 0 // Optional, if above is set to 1 checks for specific function of NTNet (currently NTNET_SOFTWAREDOWNLOAD, NTNET_PEERTOPEER, NTNET_SYSTEMCONTROL and NTNET_COMMUNICATION)
var/ntnet_status = 1 // NTNet status, updated every tick by computer running this program. Don't use this for checks if NTNet works, computers do that. Use this for calculations, etc.
@@ -125,6 +127,7 @@
if(can_run(user, 1) || !requires_access_to_run)
if(nanomodule_path)
NM = new nanomodule_path(src, new /datum/topic_manager/program(src), src)
NM.using_access = user.GetAccess()
if(requires_ntnet && network_destination)
generate_network_log("Connection opened to [network_destination].")
program_state = PROGRAM_STATE_ACTIVE

View File

@@ -2,6 +2,8 @@
filename = "ntn_dos"
filedesc = "DoS Traffic Generator"
program_icon_state = "hostile"
program_key_state = "security_key"
program_menu_icon = "arrow-4-diag"
extended_desc = "This advanced script can perform denial of service attacks against NTNet quantum relays. The system administrator will probably notice this. Multiple devices can run this program together against same relay for increased effect"
size = 20
requires_ntnet = 1

View File

@@ -3,6 +3,8 @@
filedesc = "Camera Decryption Tool"
nanomodule_path = /datum/nano_module/camera_monitor/hacked
program_icon_state = "hostile"
program_key_state = "security_key"
program_menu_icon = "zoomin"
extended_desc = "This very advanced piece of software uses adaptive programming and large database of cipherkeys to bypass most encryptions used on camera networks. Be warned that system administrator may notice this."
size = 73 // Very large, a price for bypassing ID checks completely.
available_on_ntnet = 0

View File

@@ -2,6 +2,8 @@
filename = "revelation"
filedesc = "Revelation"
program_icon_state = "hostile"
program_key_state = "security_key"
program_menu_icon = "home"
extended_desc = "This virus can destroy hard drive of system it is executed on. It may be obfuscated to look like another non-malicious program. Once armed, it will destroy the system upon next execution."
size = 13
requires_ntnet = 0
@@ -48,6 +50,10 @@
if(!newname)
return
filedesc = newname
for(var/datum/computer_file/program/P in ntnet_global.available_station_software)
if(filedesc == P.filedesc)
program_menu_icon = P.program_menu_icon
break
return 1
/datum/computer_file/program/revelation/clone()

View File

@@ -3,7 +3,9 @@
filedesc = "ID card modification program"
nanomodule_path = /datum/nano_module/program/card_mod
program_icon_state = "id"
extended_desc = "Program for programming employee ID cards to access parts of the station."
program_key_state = "id_key"
program_menu_icon = "key"
extended_desc = "Program for programming crew ID cards."
required_access = access_hop
requires_ntnet = 0
size = 8

View File

@@ -5,15 +5,17 @@
#define STATE_ALERT_LEVEL 5
/datum/computer_file/program/comm
filename = "comm"
filedesc = "Command and communications program."
filedesc = "Command and Communications Program"
program_icon_state = "comm"
program_key_state = "med_key"
program_menu_icon = "flag"
nanomodule_path = /datum/nano_module/program/comm
extended_desc = "Used to command and control the station. Can relay long-range communications. This program can not be run on tablet computers."
extended_desc = "Used to command and control. Can relay long-range communications. This program can not be run on tablet computers."
required_access = access_heads
requires_ntnet = 1
size = 12
usage_flags = PROGRAM_CONSOLE | PROGRAM_LAPTOP
network_destination = "station long-range communication array"
network_destination = "long-range communication array"
var/datum/comm_message_listener/message_core = new
/datum/computer_file/program/comm/clone()
@@ -23,7 +25,7 @@
return temp
/datum/nano_module/program/comm
name = "Command and communications program"
name = "Command and Communications Program"
//available_to_ai = TRUE
var/current_status = STATE_DEFAULT
var/msg_line1 = ""

View File

@@ -4,6 +4,8 @@
nanomodule_path = /datum/nano_module/alarm_monitor/engineering
ui_header = "alarm_green.gif"
program_icon_state = "alert-green"
program_key_state = "atmos_key"
program_menu_icon = "alert"
extended_desc = "This program provides visual interface for the alarm system."
requires_ntnet = 1
network_destination = "alarm monitoring network"
@@ -43,7 +45,7 @@
/datum/nano_module/alarm_monitor/engineering/New()
..()
alarm_handlers = list(atmosphere_alarm, fire_alarm, power_alarm)
alarm_handlers = list(atmosphere_alarm, camera_alarm, fire_alarm, power_alarm)
/datum/nano_module/alarm_monitor/security/New()
..()

View File

@@ -3,6 +3,8 @@
filedesc = "Atmosphere Control"
nanomodule_path = /datum/nano_module/atmos_control
program_icon_state = "atmos_control"
program_key_state = "atmos_key"
program_menu_icon = "shuffle"
extended_desc = "This program allows remote control of air alarms. This program can not be run on tablet computers."
required_access = access_atmospherics
requires_ntnet = 1

View File

@@ -3,6 +3,8 @@
filedesc = "Power Monitoring"
nanomodule_path = /datum/nano_module/power_monitor/
program_icon_state = "power_monitor"
program_key_state = "power_key"
program_menu_icon = "battery-3"
extended_desc = "This program connects to sensors to provide information about electrical systems"
ui_header = "power_norm.gif"
required_access = access_engine

View File

@@ -3,6 +3,8 @@
filedesc = "RCON Remote Control"
nanomodule_path = /datum/nano_module/rcon
program_icon_state = "generic"
program_key_state = "rd_key"
program_menu_icon = "power"
extended_desc = "This program allows remote control of power distribution systems. This program can not be run on tablet computers."
required_access = access_engine
requires_ntnet = 1

View File

@@ -3,6 +3,8 @@
filedesc = "Supermatter Monitoring"
nanomodule_path = /datum/nano_module/supermatter_monitor/
program_icon_state = "smmon_0"
program_key_state = "tech_key"
program_menu_icon = "notice"
extended_desc = "This program connects to specially calibrated supermatter sensors to provide information on the status of supermatter-based engines."
ui_header = "smmon_0.gif"
required_access = access_engine

View File

@@ -29,6 +29,8 @@
filedesc = "Camera Monitoring"
nanomodule_path = /datum/nano_module/camera_monitor
program_icon_state = "cameras"
program_key_state = "generic_key"
program_menu_icon = "search"
extended_desc = "This program allows remote access to the camera system. Some camera networks may have additional access requirements."
size = 12
available_on_ntnet = 1

View File

@@ -7,6 +7,8 @@
filedesc = "Computer Configuration Tool"
extended_desc = "This program allows configuration of computer's hardware"
program_icon_state = "generic"
program_key_state = "generic_key"
program_menu_icon = "gear"
unsendable = 1
undeletable = 1
size = 4

View File

@@ -3,6 +3,8 @@
filedesc = "Email Client"
extended_desc = "This program may be used to log in into your email account."
program_icon_state = "generic"
program_key_state = "generic_key"
program_menu_icon = "mail-closed"
size = 7
requires_ntnet = 1
available_on_ntnet = 1

View File

@@ -1,10 +1,10 @@
#define MAX_TEXTFILE_LENGTH 128000 // 512GQ file
/datum/computer_file/program/filemanager
filename = "filemanager"
filedesc = "NTOS File Manager"
extended_desc = "This program allows management of files."
program_icon_state = "generic"
program_key_state = "generic_key"
program_menu_icon = "folder-collapsed"
size = 8
requires_ntnet = 0
available_on_ntnet = 0
@@ -89,9 +89,9 @@
return 1
var/oldtext = html_decode(F.stored_data)
oldtext = replacetext(oldtext, "\[editorbr\]", "\n")
oldtext = replacetext(oldtext, "\[br\]", "\n")
var/newtext = sanitize(replacetext(input(usr, "Editing file [open_file]. You may use most tags used in paper formatting:", "Text Editor", oldtext) as message|null, "\n", "\[editorbr\]"), MAX_TEXTFILE_LENGTH)
var/newtext = sanitize(replacetext(input(usr, "Editing file [open_file]. You may use most tags used in paper formatting:", "Text Editor", oldtext) as message|null, "\n", "\[br\]"), MAX_TEXTFILE_LENGTH)
if(!newtext)
return
@@ -204,5 +204,4 @@
ui = new(user, src, ui_key, "file_manager.tmpl", "NTOS File Manager", 575, 700, state = state)
ui.auto_update_layout = 1
ui.set_initial_data(data)
ui.open()
#undef MAX_TEXTFILE_LENGTH
ui.open()

View File

@@ -6,6 +6,7 @@
filename = "arcadec" // File name, as shown in the file browser program.
filedesc = "Unknown Game" // User-Friendly name. In this case, we will generate a random name in constructor.
program_icon_state = "game" // Icon state of this program's screen.
program_menu_icon = "script"
extended_desc = "Fun for the whole family! Probably not an AAA title, but at least you can download it on the corporate network.." // A nice description.
size = 5 // Size in GQ. Integers only. Smaller sizes should be used for utility/low use programs (like this one), while large sizes are for important programs.
requires_ntnet = 0 // This particular program does not require NTNet network conectivity...

View File

@@ -0,0 +1,191 @@
/*
In reply to this set of comments on lib_machines.dm:
// TODO: Make this an actual /obj/machinery/computer that can be crafted from circuit boards and such
// It is August 22nd, 2012... This TODO has already been here for months.. I wonder how long it'll last before someone does something about it.
The answer was five and a half years -ZeroBits
*/
/datum/computer_file/program/library
filename = "library"
filedesc = "Library"
extended_desc = "This program can be used to view e-books from an external archive."
program_icon_state = "word"
program_key_state = "atmos_key"
program_menu_icon = "note"
size = 6
requires_ntnet = 1
available_on_ntnet = 1
nanomodule_path = /datum/nano_module/library
/datum/nano_module/library
name = "Library"
var/error_message = ""
var/current_book
var/obj/machinery/libraryscanner/scanner
var/sort_by = "id"
/datum/nano_module/library/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state)
var/list/data = host.initial_data()
if(error_message)
data["error"] = error_message
else if(current_book)
data["current_book"] = current_book
else
var/list/all_entries[0]
establish_old_db_connection()
if(!dbcon_old.IsConnected())
error_message = "Unable to contact External Archive. Please contact your system administrator for assistance."
else
var/DBQuery/query = dbcon_old.NewQuery("SELECT id, author, title, category FROM library ORDER BY "+sanitizeSQL(sort_by))
query.Execute()
while(query.NextRow())
all_entries.Add(list(list(
"id" = query.item[1],
"author" = query.item[2],
"title" = query.item[3],
"category" = query.item[4]
)))
data["book_list"] = all_entries
data["scanner"] = istype(scanner)
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "library.tmpl", "Library Program", 575, 700, state = state)
ui.auto_update_layout = 1
ui.set_initial_data(data)
ui.open()
/datum/nano_module/library/Topic(href, href_list)
if(..())
return 1
if(href_list["viewbook"])
view_book(href_list["viewbook"])
return 1
if(href_list["viewid"])
view_book(sanitizeSQL(input("Enter USBN:") as num|null))
return 1
if(href_list["closebook"])
current_book = null
return 1
if(href_list["connectscanner"])
if(!nano_host())
return 1
for(var/d in GLOB.cardinal)
var/obj/machinery/libraryscanner/scn = locate(/obj/machinery/libraryscanner, get_step(nano_host(), d))
if(scn && scn.anchored)
scanner = scn
return 1
if(href_list["uploadbook"])
if(!scanner || !scanner.anchored)
scanner = null
error_message = "Hardware Error: No scanner detected. Unable to access cache."
return 1
if(!scanner.cache)
error_message = "Interface Error: Scanner cache does not contain any data. Please scan a book."
return 1
var/obj/item/weapon/book/B = scanner.cache
if(B.unique)
error_message = "Interface Error: Cached book is copy-protected."
return 1
//B.SetName(input(usr, "Enter Book Title", "Title", B.name) as text|null)
B.author = input(usr, "Enter Author Name", "Author", B.author) as text|null
if(!B.author)
B.author = "Anonymous"
else if(lowertext(B.author) == "edgar allen poe" || lowertext(B.author) == "edgar allan poe")
error_message = "User Error: Upload something original."
return 1
if(!B.title)
B.title = "Untitled"
var/choice = input(usr, "Upload [B.name] by [B.author] to the External Archive?") in list("Yes", "No")
if(choice == "Yes")
establish_old_db_connection()
if(!dbcon_old.IsConnected())
error_message = "Network Error: Connection to the Archive has been severed."
return 1
var/upload_category = input(usr, "Upload to which category?") in list("Fiction", "Non-Fiction", "Reference", "Religion")
var/sqltitle = sanitizeSQL(B.name)
var/sqlauthor = sanitizeSQL(B.author)
var/sqlcontent = sanitizeSQL(B.dat)
var/sqlcategory = sanitizeSQL(upload_category)
var/DBQuery/query = dbcon_old.NewQuery("INSERT INTO library (author, title, content, category) VALUES ('[sqlauthor]', '[sqltitle]', '[sqlcontent]', '[sqlcategory]')")
if(!query.Execute())
to_chat(usr, query.ErrorMsg())
error_message = "Network Error: Unable to upload to the Archive. Contact your system Administrator for assistance."
return 1
else
log_and_message_admins("has uploaded the book titled [B.name], [length(B.dat)] signs")
log_game("[usr.name]/[usr.key] has uploaded the book titled [B.name], [length(B.dat)] signs")
alert("Upload Complete.")
return 1
return 0
if(href_list["printbook"])
if(!current_book)
error_message = "Software Error: Unable to print; book not found."
return 1
//PRINT TO BINDER
if(!nano_host())
return 1
for(var/d in GLOB.cardinal)
var/obj/machinery/bookbinder/bndr = locate(/obj/machinery/bookbinder, get_step(nano_host(), d))
if(bndr && bndr.anchored)
var/obj/item/weapon/book/B = new(bndr.loc)
//B.SetName(current_book["title"])
B.title = current_book["title"]
B.author = current_book["author"]
B.dat = current_book["content"]
B.icon_state = "book[rand(1,7)]"
B.desc = current_book["author"]+", "+current_book["title"]+", "+"USBN "+current_book["id"]
bndr.visible_message("\The [bndr] whirs as it prints and binds a new book.")
return 1
//Regular printing
print_text("<i>Author: [current_book["author"]]<br>USBN: [current_book["id"]]</i><br><h3>[current_book["title"]]</h3><br>[current_book["content"]]", usr)
return 1
if(href_list["sortby"])
sort_by = href_list["sortby"]
return 1
if(href_list["reseterror"])
if(error_message)
current_book = null
scanner = null
sort_by = "id"
error_message = ""
return 1
/datum/nano_module/library/proc/view_book(var/id)
if(current_book || !id)
return 0
var/sqlid = sanitizeSQL(id)
establish_old_db_connection()
if(!dbcon_old.IsConnected())
error_message = "Network Error: Connection to the Archive has been severed."
return 1
var/DBQuery/query = dbcon_old.NewQuery("SELECT * FROM library WHERE id=[sqlid]")
query.Execute()
while(query.NextRow())
current_book = list(
"id" = query.item[1],
"author" = query.item[2],
"title" = query.item[3],
"content" = query.item[4]
)
break
return 1

View File

@@ -3,6 +3,8 @@
filedesc = "NTNet/ExoNet News Browser"
extended_desc = "This program may be used to view and download news articles from the network."
program_icon_state = "generic"
program_key_state = "generic_key"
program_menu_icon = "contact"
size = 4
requires_ntnet = 1
available_on_ntnet = 1

View File

@@ -2,6 +2,8 @@
filename = "ntndownloader"
filedesc = "NTNet Software Download Tool"
program_icon_state = "generic"
program_key_state = "generic_key"
program_menu_icon = "arrowthickstop-1-s"
extended_desc = "This program allows downloads of software from official NT repositories"
unsendable = 1
undeletable = 1
@@ -16,6 +18,7 @@
var/download_completion = 0 //GQ of downloaded data.
var/download_netspeed = 0
var/downloaderror = ""
var/list/downloads_queue[0]
/datum/computer_file/program/ntnetdownload/kill_program()
..()
@@ -25,20 +28,14 @@
downloaderror = ""
ui_header = "downloader_finished.gif"
/datum/computer_file/program/ntnetdownload/proc/begin_file_download(var/filename)
if(downloaded_file)
return 0
var/datum/computer_file/program/PRG = ntnet_global.find_ntnet_file_by_name(filename)
if(!PRG || !istype(PRG))
return 0
// Attempting to download antag only program, but without having emagged computer. No.
if(PRG.available_on_syndinet && !computer_emagged)
return 0
if(!computer || !computer.hard_drive || !computer.hard_drive.try_store_file(PRG))
if(!check_file_download(filename))
return 0
ui_header = "downloader_running.gif"
@@ -55,6 +52,22 @@
downloaded_file = PRG.clone()
/datum/computer_file/program/ntnetdownload/proc/check_file_download(var/filename)
//returns 1 if file can be downloaded, returns 0 if download prohibited
var/datum/computer_file/program/PRG = ntnet_global.find_ntnet_file_by_name(filename)
if(!PRG || !istype(PRG))
return 0
// Attempting to download antag only program, but without having emagged computer. No.
if(PRG.available_on_syndinet && !computer_emagged)
return 0
if(!computer || !computer.hard_drive || !computer.hard_drive.try_store_file(PRG))
return 0
return 1
/datum/computer_file/program/ntnetdownload/proc/abort_file_download()
if(!downloaded_file)
return
@@ -79,6 +92,10 @@
return
if(download_completion >= downloaded_file.size)
complete_file_download()
if(downloads_queue.len > 0)
begin_file_download(downloads_queue[1])
downloads_queue.Remove(downloads_queue[1])
// Download speed according to connectivity state. NTNet server is assumed to be on unlimited speed so we're limited by our local connectivity
download_netspeed = 0
// Speed defines are found in misc.dm
@@ -97,6 +114,11 @@
if(href_list["PRG_downloadfile"])
if(!downloaded_file)
begin_file_download(href_list["PRG_downloadfile"])
else if(check_file_download(href_list["PRG_downloadfile"]) && !downloads_queue.Find(href_list["PRG_downloadfile"]) && downloaded_file.filename != href_list["PRG_downloadfile"])
downloads_queue += href_list["PRG_downloadfile"]
return 1
if(href_list["PRG_removequeued"])
downloads_queue.Remove(href_list["PRG_removequeued"])
return 1
if(href_list["PRG_reseterror"])
if(downloaderror)
@@ -129,40 +151,46 @@
// This IF cuts on data transferred to client, so i guess it's worth it.
if(prog.downloaderror) // Download errored. Wait until user resets the program.
data["error"] = prog.downloaderror
else if(prog.downloaded_file) // Download running. Wait please..
if(prog.downloaded_file) // Download running. Wait please..
data["downloadname"] = prog.downloaded_file.filename
data["downloaddesc"] = prog.downloaded_file.filedesc
data["downloadsize"] = prog.downloaded_file.size
data["downloadspeed"] = prog.download_netspeed
data["downloadcompletion"] = round(prog.download_completion, 0.1)
else // No download running, pick file.
data["disk_size"] = my_computer.hard_drive.max_capacity
data["disk_used"] = my_computer.hard_drive.used_capacity
var/list/all_entries[0]
for(var/datum/computer_file/program/P in ntnet_global.available_station_software)
// Only those programs our user can run will show in the list
if(!P.can_run(user) && P.requires_access_to_download)
continue
all_entries.Add(list(list(
data["disk_size"] = my_computer.hard_drive.max_capacity
data["disk_used"] = my_computer.hard_drive.used_capacity
var/list/all_entries[0]
for(var/datum/computer_file/program/P in ntnet_global.available_station_software)
// Only those programs our user can run will show in the list
if(!P.can_run(user) && P.requires_access_to_download)
continue
all_entries.Add(list(list(
"filename" = P.filename,
"filedesc" = P.filedesc,
"fileinfo" = P.extended_desc,
"size" = P.size,
"icon" = P.program_menu_icon
)))
data["hackedavailable"] = 0
if(prog.computer_emagged) // If we are running on emagged computer we have access to some "bonus" software
var/list/hacked_programs[0]
for(var/datum/computer_file/program/P in ntnet_global.available_antag_software)
data["hackedavailable"] = 1
hacked_programs.Add(list(list(
"filename" = P.filename,
"filedesc" = P.filedesc,
"fileinfo" = P.extended_desc,
"size" = P.size
"size" = P.size,
"icon" = P.program_menu_icon
)))
data["hackedavailable"] = 0
if(prog.computer_emagged) // If we are running on emagged computer we have access to some "bonus" software
var/list/hacked_programs[0]
for(var/datum/computer_file/program/P in ntnet_global.available_antag_software)
data["hackedavailable"] = 1
hacked_programs.Add(list(list(
"filename" = P.filename,
"filedesc" = P.filedesc,
"fileinfo" = P.extended_desc,
"size" = P.size
)))
data["hacked_programs"] = hacked_programs
data["hacked_programs"] = hacked_programs
data["downloadable_programs"] = all_entries
if(prog.downloads_queue.len > 0)
data["downloads_queue"] = prog.downloads_queue
data["downloadable_programs"] = all_entries
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "ntnet_downloader.tmpl", "NTNet Download Program", 575, 700, state = state)

View File

@@ -2,6 +2,8 @@
filename = "ntnrc_client"
filedesc = "NTNet Relay Chat Client"
program_icon_state = "command"
program_key_state = "med_key"
program_menu_icon = "comment"
extended_desc = "This program allows communication over NTNRC network"
size = 8
requires_ntnet = 1

View File

@@ -5,6 +5,8 @@ var/global/nttransfer_uid = 0
filedesc = "NTNet P2P Transfer Client"
extended_desc = "This program allows for simple file transfer via direct peer to peer connection."
program_icon_state = "comm_logs"
program_key_state = "generic_key"
program_menu_icon = "transferthick-e-w"
size = 7
requires_ntnet = 1
requires_ntnet_feature = NTNET_PEERTOPEER
@@ -29,6 +31,7 @@ var/global/nttransfer_uid = 0
..()
/datum/computer_file/program/nttransfer/process_tick()
..()
// Server mode
if(provided_file)
for(var/datum/computer_file/program/nttransfer/C in connected_clients)

View File

@@ -0,0 +1,236 @@
/datum/computer_file/program/wordprocessor
filename = "wordprocessor"
filedesc = "NanoWord"
extended_desc = "This program allows the editing and preview of text documents."
program_icon_state = "word"
program_key_state = "atmos_key"
size = 4
requires_ntnet = 0
available_on_ntnet = 1
nanomodule_path = /datum/nano_module/program/computer_wordprocessor/
var/browsing
var/open_file
var/loaded_data
var/error
var/is_edited
/datum/computer_file/program/wordprocessor/proc/get_file(var/filename)
var/obj/item/weapon/computer_hardware/hard_drive/HDD = computer.hard_drive
if(!HDD)
return
var/datum/computer_file/data/F = HDD.find_file_by_name(filename)
if(!istype(F))
return
return F
/datum/computer_file/program/wordprocessor/proc/open_file(var/filename)
var/datum/computer_file/data/F = get_file(filename)
if(F)
open_file = F.filename
loaded_data = F.stored_data
return 1
/datum/computer_file/program/wordprocessor/proc/save_file(var/filename)
var/datum/computer_file/data/F = get_file(filename)
if(!F) //try to make one if it doesn't exist
F = create_file(filename, loaded_data)
return !isnull(F)
var/datum/computer_file/data/backup = F.clone()
var/obj/item/weapon/computer_hardware/hard_drive/HDD = computer.hard_drive
if(!HDD)
return
HDD.remove_file(F)
F.stored_data = loaded_data
F.calculate_size()
if(!HDD.store_file(F))
HDD.store_file(backup)
return 0
is_edited = 0
return 1
/datum/computer_file/program/wordprocessor/proc/create_file(var/newname, var/data = "")
if(!newname)
return
var/obj/item/weapon/computer_hardware/hard_drive/HDD = computer.hard_drive
if(!HDD)
return
if(get_file(newname))
return
var/datum/computer_file/data/F = new/datum/computer_file/data()
F.filename = newname
F.filetype = "TXT"
F.stored_data = data
F.calculate_size()
if(HDD.store_file(F))
return F
/datum/computer_file/program/wordprocessor/Topic(href, href_list)
if(..())
return 1
if(href_list["PRG_txtrpeview"])
show_browser(usr,"<HTML><HEAD><TITLE>[open_file]</TITLE></HEAD>[pencode2html(loaded_data)]</BODY></HTML>", "window=[open_file]")
return 1
if(href_list["PRG_taghelp"])
to_chat(usr, "<span class='notice'>The hologram of a googly-eyed paper clip helpfully tells you:</span>")
var/help = {"
\[br\] : Creates a linebreak.
\[center\] - \[/center\] : Centers the text.
\[h1\] - \[/h1\] : First level heading.
\[h2\] - \[/h2\] : Second level heading.
\[h3\] - \[/h3\] : Third level heading.
\[b\] - \[/b\] : Bold.
\[i\] - \[/i\] : Italic.
\[u\] - \[/u\] : Underlined.
\[small\] - \[/small\] : Decreases the size of the text.
\[large\] - \[/large\] : Increases the size of the text.
\[field\] : Inserts a blank text field, which can be filled later. Useful for forms.
\[date\] : Current station date.
\[time\] : Current station time.
\[list\] - \[/list\] : Begins and ends a list.
\[*\] : A list item.
\[hr\] : Horizontal rule.
\[table\] - \[/table\] : Creates table using \[row\] and \[cell\] tags.
\[grid\] - \[/grid\] : Table without visible borders, for layouts.
\[row\] - New table row.
\[cell\] - New table cell.
\[logo\] - Inserts NT logo image.
\[bluelogo\] - Inserts blue NT logo image.
\[solcrest\] - Inserts SCG crest image.
\[terraseal\] - Inserts TCC seal"}
to_chat(usr, help)
return 1
if(href_list["PRG_closebrowser"])
browsing = 0
return 1
if(href_list["PRG_backtomenu"])
error = null
return 1
if(href_list["PRG_loadmenu"])
browsing = 1
return 1
if(href_list["PRG_openfile"])
. = 1
if(is_edited)
if(alert("Would you like to save your changes first?",,"Yes","No") == "Yes")
save_file(open_file)
browsing = 0
if(!open_file(href_list["PRG_openfile"]))
error = "I/O error: Unable to open file '[href_list["PRG_openfile"]]'."
if(href_list["PRG_newfile"])
. = 1
if(is_edited)
if(alert("Would you like to save your changes first?",,"Yes","No") == "Yes")
save_file(open_file)
var/newname = sanitize(input(usr, "Enter file name:", "New File") as text|null)
if(!newname)
return 1
var/datum/computer_file/data/F = create_file(newname)
if(F)
open_file = F.filename
loaded_data = ""
return 1
else
error = "I/O error: Unable to create file '[href_list["PRG_saveasfile"]]'."
if(href_list["PRG_saveasfile"])
. = 1
var/newname = sanitize(input(usr, "Enter file name:", "Save As") as text|null)
if(!newname)
return 1
var/datum/computer_file/data/F = create_file(newname, loaded_data)
if(F)
open_file = F.filename
else
error = "I/O error: Unable to create file '[href_list["PRG_saveasfile"]]'."
return 1
if(href_list["PRG_savefile"])
. = 1
if(!open_file)
open_file = sanitize(input(usr, "Enter file name:", "Save As") as text|null)
if(!open_file)
return 0
if(!save_file(open_file))
error = "I/O error: Unable to save file '[open_file]'."
return 1
if(href_list["PRG_editfile"])
var/oldtext = html_decode(loaded_data)
oldtext = replacetext(oldtext, "\[br\]", "\n")
var/newtext = sanitize(replacetext(input(usr, "Editing file '[open_file]'. You may use most tags used in paper formatting:", "Text Editor", oldtext) as message|null, "\n", "\[br\]"), MAX_TEXTFILE_LENGTH)
if(!newtext)
return
loaded_data = newtext
is_edited = 1
return 1
if(href_list["PRG_printfile"])
. = 1
if(!computer.nano_printer)
error = "Missing Hardware: Your computer does not have the required hardware to complete this operation."
return 1
if(!computer.nano_printer.print_text(pencode2html(loaded_data)))
error = "Hardware error: Printer was unable to print the file. It may be out of paper."
return 1
/datum/nano_module/program/computer_wordprocessor
name = "Word Processor"
/datum/nano_module/program/computer_wordprocessor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state)
var/list/data = host.initial_data()
var/datum/computer_file/program/wordprocessor/PRG
PRG = program
var/obj/item/weapon/computer_hardware/hard_drive/HDD
var/obj/item/weapon/computer_hardware/hard_drive/portable/RHDD
if(PRG.error)
data["error"] = PRG.error
if(PRG.browsing)
data["browsing"] = PRG.browsing
if(!PRG.computer || !PRG.computer.hard_drive)
data["error"] = "I/O ERROR: Unable to access hard drive."
else
HDD = PRG.computer.hard_drive
var/list/files[0]
for(var/datum/computer_file/F in HDD.stored_files)
if(F.filetype == "TXT")
files.Add(list(list(
"name" = F.filename,
"size" = F.size
)))
data["files"] = files
RHDD = PRG.computer.portable_drive
if(RHDD)
data["usbconnected"] = 1
var/list/usbfiles[0]
for(var/datum/computer_file/F in RHDD.stored_files)
if(F.filetype == "TXT")
usbfiles.Add(list(list(
"name" = F.filename,
"size" = F.size,
)))
data["usbfiles"] = usbfiles
else if(PRG.open_file)
data["filedata"] = pencode2html(PRG.loaded_data)
data["filename"] = PRG.is_edited ? "[PRG.open_file]*" : PRG.open_file
else
data["filedata"] = pencode2html(PRG.loaded_data)
data["filename"] = "UNNAMED"
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "word_processor.tmpl", "Word Processor", 575, 700, state = state)
ui.auto_update_layout = 1
ui.set_initial_data(data)
ui.open()

View File

@@ -3,12 +3,18 @@
filedesc = "Suit Sensors Monitoring"
nanomodule_path = /datum/nano_module/crew_monitor
program_icon_state = "crew"
program_key_state = "med_key"
program_menu_icon = "heart"
extended_desc = "This program connects to life signs monitoring system to provide basic information on crew health."
required_access = access_medical
requires_ntnet = 1
network_destination = "crew lifesigns monitoring system"
size = 11
/datum/nano_module/crew_monitor
name = "Crew monitor"

View File

@@ -3,6 +3,8 @@
filedesc = "Email Administration Utility"
extended_desc = "This program may be used to administrate NTNet's emailing service."
program_icon_state = "comm_monitor"
program_key_state = "generic_key"
program_menu_icon = "mail-open"
size = 12
requires_ntnet = 1
available_on_ntnet = 1

View File

@@ -2,6 +2,8 @@
filename = "ntmonitor"
filedesc = "NTNet Diagnostics and Monitoring"
program_icon_state = "comm_monitor"
program_key_state = "generic_key"
program_menu_icon = "wrench"
extended_desc = "This program monitors the local NTNet network, provides access to logging systems, and allows for configuration changes"
size = 12
requires_ntnet = 1

View File

@@ -14,6 +14,8 @@ var/warrant_uid = 0
extended_desc = "Official NTsec program for creation and handling of warrants."
size = 8
program_icon_state = "warrant"
program_key_state = "security_key"
program_menu_icon = "star"
requires_ntnet = 1
available_on_ntnet = 1
required_access = access_security

View File

@@ -32,12 +32,37 @@
/obj/item/weapon/computer_hardware/nano_printer/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/paper))
if(stored_paper >= max_paper)
to_chat(user, "You try to add \the [W] into [src], but it's paper bin is full")
to_chat(user, "You try to add \the [W] into \the [src], but its paper bin is full.")
return
to_chat(user, "You insert \the [W] into [src].")
qdel(W)
stored_paper++
else if(istype(W, /obj/item/weapon/paper_bundle))
var/obj/item/weapon/paper_bundle/B = W
var/num_of_pages_added = 0
if(stored_paper >= max_paper)
to_chat(user, "You try to add \the [W] into \the [src], but its paper bin is full.")
return
for(var/obj/item/weapon/bundleitem in B) //loop through items in bundle
if(istype(bundleitem, /obj/item/weapon/paper)) //if item is paper (and not photo), add into the bin
B.pages.Remove(bundleitem)
qdel(bundleitem)
num_of_pages_added++
stored_paper++
if(stored_paper >= max_paper) //check if the printer is full yet
to_chat(user, "The printer has been filled to full capacity.")
break
if(B.pages.len == 0) //if all its papers have been put into the printer, delete bundle
qdel(W)
else if(B.pages.len == 1) //if only one item left, extract item and delete the one-item bundle
user.drop_from_inventory(B)
user.put_in_hands(B[1])
qdel(B)
else //if at least two items remain, just update the bundle icon
B.update_icon()
to_chat(user, "You add [num_of_pages_added] papers from \the [W] into \the [src].")
return
/obj/item/weapon/computer_hardware/nano_printer/Destroy()
if(holder2 && (holder2.nano_printer == src))

View File

@@ -2,6 +2,7 @@
var/name
var/datum/host
var/datum/topic_manager/topic_manager
var/list/using_access
/datum/nano_module/New(var/datum/host, var/topic_manager)
..()
@@ -21,6 +22,12 @@
if(!access)
return 1
if(using_access)
if(access in using_access)
return 1
else
return 0
if(!istype(user))
return 0
@@ -38,6 +45,18 @@
return TRUE
. = ..()
/datum/nano_module/proc/print_text(var/text, var/mob/user)
var/obj/item/modular_computer/MC = nano_host()
if(istype(MC))
if(!MC.nano_printer)
to_chat(user, "Error: No printer detected. Unable to print document.")
return
if(!MC.nano_printer.print_text(text))
to_chat(user, "Error: Printer was unable to print the document. It may be out of paper.")
else
to_chat(user, "Error: Unable to detect compatible printer interface. Are you running NTOSv2 compatible system?")
/datum/proc/initial_data()
return list()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -1,44 +1,44 @@
{{if data.gameover}}
centerh2Game Over!h2
h3{{data.information}}h3
{{helper.link('New Game', null, { new_game 1 })}}center
<center><h2>Game Over!</h2>
<h3>{{:data.information}}</h3>
{{:helper.link('New Game', null, { "new_game" : 1 })}}</center>
{{else}}
{{if data.information}}
centeri{{data.information}}icenter
{{if}}
centerh3Playerh3center
div class='item'
div class='itemLabel'
Health
div
div class='itemContent'
{{data.player_health}}
div
div class='itemLabel'
Mana
div
div class='itemContent'
{{data.player_mana}}
div
div
centerh3Enemy {{data.enemy_name}}h3center
div class='item'
div class='itemLabel'
Health
div
div class='itemContent'
{{data.enemy_health}}
div
div class='itemLabel'
Mana
div
div class='itemContent'
{{data.enemy_mana}}
div
div
centerh3Actionsh3center
{{helper.link('Attack', null, { attack 1 })}}
{{helper.link('Heal', null, { heal 1 })}}
{{helper.link('Regain Mana', null, { regain_mana 1 })}}
{{helper.link('New Game', null, { new_game 1 })}}
{{if}}
<center><i>{{:data.information}}</i></center>
{{/if}}
<center><h3>Player</h3></center>
<div class='item'>
<div class='itemLabel'>
Health:
</div>
<div class='itemContent'>
{{:data.player_health}}
</div>
<div class='itemLabel'>
Mana:
</div>
<div class='itemContent'>
{{:data.player_mana}}
</div>
</div>
<center><h3>Enemy: {{:data.enemy_name}}</h3></center>
<div class='item'>
<div class='itemLabel'>
Health:
</div>
<div class='itemContent'>
{{:data.enemy_health}}
</div>
<div class='itemLabel'>
Mana:
</div>
<div class='itemContent'>
{{:data.enemy_mana}}
</div>
</div>
<center><h3>Actions</h3></center>
{{:helper.link('Attack', null, { "attack" : 1 })}}
{{:helper.link('Heal', null, { "heal" : 1 })}}
{{:helper.link('Regain Mana', null, { "regain_mana" : 1 })}}
{{:helper.link('New Game', null, { "new_game" : 1 })}}
{{/if}}

View File

@@ -67,4 +67,4 @@
<br><br>
{{/for}}
<hr><hr>
<i>NTOS v2.0.4b Copyright NanoTrasen 2557 - 2559</i>
<i>NTOS v2.0.4b Copyright NanoTrasen 2557 - 2559</i>

View File

@@ -1,8 +1,8 @@
<i>No program loaded. Please select program from list below.</i>
<table>
{{for data.programs}}
<tr><td>{{:helper.link(value.desc, null, {'PC_runprogram' : value.name})}}
<td>{{:helper.link('X', null, {'PC_killprogram' : value.name}, (value.running ? null : 'disabled'))}}
<td>{{:helper.link('AR', null, {'PC_setautorun' : value.name}, null, (value.autorun ? 'yellowButton' : null))}}
<tr><td>{{:helper.link(value.desc, value.icon, {'PC_runprogram' : value.name})}}
<td>{{:helper.link('X', null, {'PC_killprogram' : value.name}, (value.running ? null : 'disabled'))}}
<td>{{:helper.link('AR', null, {'PC_setautorun' : value.name}, null, (value.autorun ? 'yellowButton' : null))}}
{{/for}}
</table>
</table>

View File

@@ -0,0 +1,75 @@
{{if data.error}}
<h2>Error</h2>
{{:data.error}}<br><br>
{{:helper.link("Reset", null, {'reseterror' : 1})}}
{{else data.current_book}}
<h2>{{:data.current_book.title}}</h2>
<div class="item">
<div class="itemLabel">
Author:
</div>
<div class="itemContent">
{{:data.current_book.author}}
</div>
<div class="itemLabel">
USBN:
</div>
<div class="itemContent">
{{:data.current_book.id}}
</div>
<div class="itemLabel">
Commands:
</div>
<div class="itemContent">
{{:helper.link("Close", null, {'closebook' : 1})}}
{{:helper.link("Print", null, {'printbook' : 1})}}
</div>
</div>
<div style="background-color: #FFFFFF; padding: 6px;">
{{:data.current_book.content}}
</div>
{{else}}
<h2>External Archives</h2>
<div class="item">
<div class="itemLabel">
Scanner:
</div>
<div class="itemContent">
{{:data.scanner ? 'Connected' : 'Not Connected'}}
</div>
</div>
<div class="item">
<div class="itemLabel">
Commands:
</div>
<div class="itemContent">
{{:helper.link("View By USBN", null, {'viewid' : 1})}}
{{:helper.link("Upload From Scanner", null, {'uploadbook' : 1})}}
{{:helper.link("Connect to Scanner", null, {'connectscanner' : 1})}}
</div>
</div>
<div class="item">
<div class="itemLabel">
Sort by:
</div>
<div class="itemContent">
{{:helper.link("Title", null, {'sortby' : 'title'})}}
{{:helper.link("Author", null, {'sortby' : 'author'})}}
{{:helper.link("Category", null, {'sortby' : 'category'})}}
{{:helper.link("USBN", null, {'sortby' : 'id'})}}
</div>
</div>
<table style="width:100%">
<tr><th style="width:20%">Commands<th style="width:40%">Title<th style="width:15%">Author<th style="width:15%">Category<th style="width:10%">USBN
{{for data.book_list}}
<tr><td>{{:helper.link("View", null, {'viewbook' : value.id})}}
<td>{{:value.title}}
<td>{{:value.author}}
<td>{{:value.category}}
<td>{{:value.id}}
</div>
{{/for}}
</table>
{{/if}}
<br><br><hr><i>NTOS v2.0.4b Copyright NanoTrasen 2557 - 2561</i>

View File

@@ -1,3 +1,4 @@
<link href="spacemag.css" rel="stylesheet" type="text/css">
{{if data.message}}
<div class='item'>
{{:data.message}}
@@ -5,14 +6,15 @@
</div>
{{/if}}
{{if data.article}}
Viewing: {{:data.title}}<br><br>
{{:data.article}}
<br><br>
Viewing: {{:data.title}}<br>
{{:helper.link('CLOSE', null, { "PRG_reset" : 1 })}}
{{:helper.link('SAVE', null, { "PRG_savearticle" : 1 })}}
{{else data.download_progress}}
<br><br>
{{if data.cover}}
<img src='{{:data.cover}}' class="cover" />
{{/if}}
{{:data.article}}
{{else data.download_running}}
Downloading file...<br><br>
<div class='item'>
<div class='itemLabel'>
@@ -26,37 +28,50 @@
Download speed:
</div>
<div class='itemContent'>
{{data.download_rate}} GQ/s
{{:data.download_rate}} GQ/s
</div>
<div class='itemLabel'>
Controls:
</div>
<div class='itemContent'>
{{:helper.link('ABORT', null, { "PRG_reset" : 1 })}}
</div>
</div>
</div>
{{else}}
<b>Listing available files</b><hr>
<h3>Listing available files</h3>
<div class='item'>
<div class='itemLabel'>
Show archived files:
</div>
<div class='itemContent'>
{{if data.showing_archived}}
{{:helper.link('YES', null, { "PRG_toggle_archived" : 1 })}}
{{else}}
{{:helper.link('NO', null, { "PRG_toggle_archived" : 1 })}}
{{/if}}
</div>
</div>
<br><hr>
{{for data.all_articles}}
<div class='item'>
<div class='itemLabel'>
Name:
Name:
</div>
<div class='itemContent'>
{{:value.name}}
</div>
<div class='itemLabel'>
Size:
Size:
</div>
<div class='itemContent'>
{{:value.size}} GQ
</div>
<div class='itemLabel'>
Actions:
Actions:
</div>
<div class='itemContent'>
{{:helper.link('OPEN', null, { "PRG_openarticle" : value.uid })}}
</div>
</div>
{{/for}}
{{/if}}
{{/if}}

View File

@@ -63,4 +63,4 @@
<tr><td>{{:helper.link(value.chan, null, {'PRG_joinchannel' : value.id})}}<br>
{{/for}}
</table>
{{/if}}
{{/if}}

View File

@@ -19,4 +19,4 @@
{{for data.relays}}
{{:helper.link(value , null, { 'PRG_target_relay' : value })}}
{{/for}}
{{/if}}
{{/if}}

View File

@@ -1,4 +1,4 @@
<i>Welcome to software download utility. Please select which software you wish to download.</i><hr>
<i>Welcome to the software download utility. Please select which software you wish to download.</i><hr>
{{if data.error}}
<h2>Download Error</h2>
<div class="itemLabel">
@@ -13,40 +13,62 @@
<div class="itemContent">
{{:helper.link("RESET", null, {'PRG_reseterror' : 1})}}
</div>
{{else data.downloadname}}
<h2>Download Running</h2>
<i>Please wait...</i>
<div class="itemLabel">
File name:
<hr>
{{/if}}
<h2>{{:data.downloadname ? 'Download Running' : 'No Downloads In Progress'}}</h2>
<i>{{:data.downloadname ? 'Please wait...' : 'Standing by...'}}</i>
<div class="item">
<div class="itemLabel">
File name:
</div>
<div class="itemContent">
{{:data.downloadname ? data.downloadname : 'N/A'}}
</div>
<div class="itemLabel">
File description:
</div>
<div class="itemContent">
{{:data.downloadname ? data.downloaddesc : 'N/A'}}
</div>
<div class="itemLabel">
File size:
</div>
<div class="itemContent">
{{:data.downloadname ? (data.downloadcompletion + 'GQ / ' + data.downloadsize + 'GQ') : 'N/A'}}
</div>
<div class="itemLabel">
Transfer Rate:
</div>
<div class="itemContent">
{{:data.downloadname ? data.downloadspeed : '0'}} GQ/s
</div>
<div class="itemLabel">
Download progress:
</div>
<div class="itemContent">
{{:helper.displayBar(data.downloadcompletion, 0, data.downloadname ? data.downloadsize : 0, 'good')}}
</div>
</div>
<div class="itemContent">
{{:data.downloadname}}
<br><hr>
<h2>Downloads Queue</h2>
<div class="item">
{{for data.downloads_queue}}
<div class="itemLabel">
{{:index + 1}}:
</div>
<div class="itemContent">
{{:value}}
{{:helper.link('', 'close', {'PRG_removequeued' : value})}}
</div>
{{empty}}
<i>The queue is currently empty.</i>
{{/for}}
</div>
<div class="itemLabel">
File description:
</div>
<div class="itemContent">
{{:data.downloaddesc}}
</div>
<div class="itemLabel">
File size:
</div>
<div class="itemContent">
{{:data.downloadcompletion}}GQ / {{:data.downloadsize}}GQ
</div>
<div class="itemLabel">
Transfer Rate:
</div>
<div class="itemContent">
{{:data.downloadspeed}} GQ/s
</div>
<div class="itemLabel">
Download progress:
</div>
<div class="itemContent">
{{:helper.displayBar(data.downloadcompletion, 0, data.downloadsize, 'good')}}
</div>
{{else}}
<br><hr>
<h2>Primary software repository</h2>
<div class="itemLabel">
Hard drive:
@@ -55,66 +77,24 @@
{{:helper.displayBar(data.disk_used, 0, data.disk_size, 'good')}}
{{:data.disk_used}}GQ / {{:data.disk_size}}GQ
</div>
<table>
{{for data.downloadable_programs}}
<div class = "item">
<div class="itemLabel">
File name:
</div>
<div class="itemContent">
{{:value.filename}} ({{:value.size}} GQ)
</div>
<div class="itemLabel">
Program name:
</div>
<div class="itemContent">
{{:value.filedesc}}
</div>
<div class="itemLabel">
Description:
</div>
<div class="itemContent">
{{:value.fileinfo}}
</div>
<div class="itemLabel">
File controls:
</div>
<div class="itemContent">
{{:helper.link("DOWNLOAD", null, {'PRG_downloadfile' : value.filename})}}
</div>
<tr><td>{{:helper.link('', value.icon, {'PRG_downloadfile' : value.filename})}}
<td><span class='white'>{{:value.filedesc}}</span>
<td>{{:value.fileinfo}}
<td>{{:value.size}} GQ
</div>
{{/for}}
</table>
{{if data.hackedavailable}}
<h2>*UNKNOWN* software repository</h2>
<i>Please note that NanoTrasen does not recommend download of software from non-official servers.</i>
{{for data.hacked_programs}}
<div class = "item">
<div class="itemLabel">
File name:
</div>
<div class="itemContent">
{{:value.filename}} ({{:value.size}} GQ)
</div>
<div class="itemLabel">
Program name:
</div>
<div class="itemContent">
{{:value.filedesc}}
</div>
<div class="itemLabel">
Description:
</div>
<div class="itemContent">
{{:value.fileinfo}}
</div>
<div class="itemLabel">
File controls:
</div>
<div class="itemContent">
{{:helper.link("DOWNLOAD", null, {'PRG_downloadfile' : value.filename})}}
</div>
</div>
<tr><td>{{:helper.link(value.filedesc, value.icon, {'PRG_downloadfile' : value.filename})}}
<td>{{:value.fileinfo}}
<td>{{:value.size}} GQ
</div>
{{/for}}
{{/if}}
{{/if}}
<br><br><hr><i>NTOS v2.0.4b Copyright NanoTrasen 2557 - 2559</i>
<br><br><hr><i>NTOS v2.0.4b Copyright NanoTrasen 2557 - 2559</i>

View File

@@ -68,7 +68,7 @@
<div class="itemContentNarrow">
<b>{{:data.idsstatus ? 'ENABLED' : 'DISABLED'}}</b>
</div>
</div>
</div>
<div class="item">
<div class="itemLabelWide">
Maximal Log Count:
@@ -109,4 +109,4 @@
{{/for}}
</div>
</div>
</div>
</div>

View File

@@ -15,7 +15,7 @@
{{else}}
{{:helper.link('DISABLED', null, { 'toggle' : 1 })}}
{{/if}}
</div>
<div class="itemLabel">
Network buffer status:
@@ -29,4 +29,4 @@
<div class="itemContent">
{{:helper.link('Purge network blacklist', null, { 'purge' : 1 })}}
</div>
{{/if}}
{{/if}}

View File

@@ -91,4 +91,4 @@
</table>
<hr>
{{:helper.link('Send file', null, { "PRG_uploadmenu" : 1 })}}
{{/if}}
{{/if}}

View File

@@ -0,0 +1,49 @@
{{if data.error}}
<h2>An error has occurred:</h2>
Additional information: {{:data.error}}<br>
<i>Please try again. If the problem persists, contact your system administrator for assistance.</i>
{{:helper.link('Back to menu', null, { "PRG_backtomenu" : 1 })}}
{{else}}
{{if data.browsing}}
{{:helper.link('BACK TO EDITOR', null, { "PRG_closebrowser" : 1 })}}
<h2>Available documents (local):</h2>
<table>
<tr><th>Name
<th>Size (GQ)
{{for data.files}}
<tr><td>{{:value.name}}
<td>{{:value.size}}GQ
<td>{{:helper.link('OPEN', null, { "PRG_openfile" : value.name })}}
{{/for}}
</table>
{{if data.usbconnected}}
<h2>Available documents (portable device):</h2>
<table>
<tr><th>Name
<th>Size (GQ)
{{for data.usbfiles}}
<tr><td>{{:value.name}}
<td>{{:value.size}}GQ
<td>{{:helper.link('OPEN', null, { "PRG_openfile" : value.name })}}
{{/for}}
</table>
{{/if}}
{{else}}
<h2>Document: {{:data.filename}}</h2>
<div class='item'>
{{:helper.link('NEW', null, { "PRG_newfile" : 1 })}}
{{:helper.link('LOAD', null, { "PRG_loadmenu" : 1 })}}
{{:helper.link('SAVE', null, { "PRG_savefile" : 1 })}}
{{:helper.link('SAVE AS', null, { "PRG_saveasfile" : 1 })}}
</div>
<div class='item'>
{{:helper.link('EDIT', null, { "PRG_editfile" : 1 })}}
{{:helper.link('PREVIEW', null, { "PRG_txtrpeview" : 1 }, data.filedata ? null : 'disabled')}}
{{:helper.link('FORMATTING HELP', null, { "PRG_taghelp" : 1 })}}
{{:helper.link('PRINT', null, { "PRG_printfile" : 1 })}}
</div><hr>
<div class='block'>
{{:data.filedata}}
</div>
{{/if}}
{{/if}}

View File

@@ -2134,10 +2134,12 @@
#include "code\modules\modular_computers\file_system\programs\generic\email_client.dm"
#include "code\modules\modular_computers\file_system\programs\generic\file_browser.dm"
#include "code\modules\modular_computers\file_system\programs\generic\game.dm"
#include "code\modules\modular_computers\file_system\programs\generic\library.dm"
#include "code\modules\modular_computers\file_system\programs\generic\news_browser.dm"
#include "code\modules\modular_computers\file_system\programs\generic\ntdownloader.dm"
#include "code\modules\modular_computers\file_system\programs\generic\ntnrc_client.dm"
#include "code\modules\modular_computers\file_system\programs\generic\nttransfer.dm"
#include "code\modules\modular_computers\file_system\programs\generic\wordprocessor.dm"
#include "code\modules\modular_computers\file_system\programs\medical\suit_sensors.dm"
#include "code\modules\modular_computers\file_system\programs\research\email_administration.dm"
#include "code\modules\modular_computers\file_system\programs\research\ntmonitor.dm"