mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 09:35:30 +01:00
Add #cargobus and gauntlets (also modernizes ntchat) (#58609)
* cargobus, start of gloves * basics of the HAUL gauntlets * fully mapped in * almost forgot the gauntlets * ntnet improvements * cargo gaunts, tablet cargobus * excludes body bags * dmis and map back * readd icons
This commit is contained in:
@@ -30,6 +30,16 @@
|
||||
install_component(new /obj/item/computer_hardware/network_card)
|
||||
install_component(new /obj/item/computer_hardware/printer/mini)
|
||||
hard_drive.store_file(new /datum/computer_file/program/shipping)
|
||||
var/datum/computer_file/program/chatclient/chatprogram
|
||||
chatprogram = new
|
||||
hard_drive.store_file(chatprogram)
|
||||
chatprogram.username = get_cargochat_username()
|
||||
|
||||
/obj/item/modular_computer/tablet/preset/cargo/proc/get_cargochat_username()
|
||||
return "cargonian_[rand(1,999)]"
|
||||
|
||||
/obj/item/modular_computer/tablet/preset/cargo/quartermaster/get_cargochat_username()
|
||||
return "quartermaster"
|
||||
|
||||
/obj/item/modular_computer/tablet/preset/advanced/atmos/Initialize() //This will be defunct and will be replaced when NtOS PDAs are done
|
||||
. = ..()
|
||||
|
||||
@@ -106,3 +106,68 @@
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
|
||||
hard_drive.store_file(new/datum/computer_file/program/chatclient())
|
||||
hard_drive.store_file(new/datum/computer_file/program/arcade())
|
||||
|
||||
// ===== CARGO CHAT CONSOLES =====
|
||||
/obj/machinery/modular_computer/console/preset/cargochat
|
||||
name = "cargo chatroom console"
|
||||
desc = "A stationary computer. This one comes preloaded with a chatroom for your cargo requests."
|
||||
///chat client installed on this computer, just helpful for linking all the computers
|
||||
var/datum/computer_file/program/chatclient/chatprogram
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/cargochat/install_programs()
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
|
||||
chatprogram = new
|
||||
chatprogram.computer = cpu
|
||||
hard_drive.store_file(chatprogram)
|
||||
chatprogram.username = "[lowertext(console_department)]_department"
|
||||
chatprogram.program_state = PROGRAM_STATE_ACTIVE
|
||||
cpu.active_program = chatprogram
|
||||
|
||||
//ONE PER MAP PLEASE, IT MAKES A CARGOBUS FOR EACH ONE OF THESE
|
||||
/obj/machinery/modular_computer/console/preset/cargochat/cargo
|
||||
console_department = "Cargo"
|
||||
name = "department chatroom console"
|
||||
desc = "A stationary computer. This one comes preloaded with a chatroom for incoming cargo requests. You may moderate it from this computer."
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/cargochat/cargo/install_programs()
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
|
||||
|
||||
//adding chat, setting it as the active window immediately
|
||||
chatprogram = new
|
||||
chatprogram.computer = cpu
|
||||
hard_drive.store_file(chatprogram)
|
||||
chatprogram.program_state = PROGRAM_STATE_ACTIVE
|
||||
cpu.active_program = chatprogram
|
||||
|
||||
//setting up chat
|
||||
chatprogram.username = "cargo_requests_operator"
|
||||
var/datum/ntnet_conversation/cargochat = new
|
||||
cargochat.operator = chatprogram //adding operator before joining the chat prevents an unnecessary message about switching op from showing
|
||||
cargochat.add_client(chatprogram)
|
||||
cargochat.title = "#cargobus"
|
||||
cargochat.strong = TRUE
|
||||
chatprogram.active_channel = cargochat.id
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/cargochat/cargo/LateInitialize()
|
||||
. = ..()
|
||||
var/datum/ntnet_conversation/cargochat = SSnetworks.station_network.get_chat_channel_by_id(chatprogram.active_channel)
|
||||
for(var/obj/machinery/modular_computer/console/preset/cargochat/cargochat_console in GLOB.machines)
|
||||
if(cargochat_console == src)
|
||||
continue
|
||||
cargochat_console.chatprogram.active_channel = chatprogram.active_channel
|
||||
cargochat.add_client(cargochat_console.chatprogram, silent = TRUE)
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/cargochat/service
|
||||
console_department = "Service"
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/cargochat/engineering
|
||||
console_department = "Engineering"
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/cargochat/science
|
||||
console_department = "Science"
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/cargochat/security
|
||||
console_department = "Security"
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/cargochat/medical
|
||||
console_department = "Medical"
|
||||
|
||||
@@ -4,28 +4,41 @@
|
||||
name = "modular computer"
|
||||
desc = "An advanced computer."
|
||||
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 5
|
||||
var/hardware_flag = 0 // A flag that describes this device type
|
||||
var/last_power_usage = 0 // Power usage during last tick
|
||||
|
||||
// Modular computers can run on various devices. Each DEVICE (Laptop, Console, Tablet,..)
|
||||
// must have it's own DMI file. Icon states must be called exactly the same in all files, but may look differently
|
||||
// If you create a program which is limited to Laptops and Consoles you don't have to add it's icon_state overlay for Tablets too, for example.
|
||||
|
||||
icon = null
|
||||
icon_state = null
|
||||
var/icon_state_unpowered = null // Icon state when the computer is turned off.
|
||||
var/icon_state_powered = null // Icon state when the computer is turned on.
|
||||
var/screen_icon_state_menu = "menu" // Icon state overlay when the computer is turned on, but no program is loaded that would override the screen.
|
||||
var/screen_icon_screensaver = "standby" // Icon state overlay when the computer is powered, but not 'switched on'.
|
||||
var/max_hardware_size = 0 // Maximal hardware size. Currently, tablets have 1, laptops 2 and consoles 3. Limits what hardware types can be installed.
|
||||
var/steel_sheet_cost = 10 // Amount of steel sheets refunded when disassembling an empty frame of this computer.
|
||||
var/light_strength = 0 // Light luminosity when turned on
|
||||
var/base_active_power_usage = 100 // Power usage when the computer is open (screen is active) and can be interacted with. Remember hardware can use power too.
|
||||
var/base_idle_power_usage = 10 // Power usage when the computer is idle and screen is off (currently only applies to laptops)
|
||||
|
||||
var/obj/item/modular_computer/processor/cpu = null // CPU that handles most logic while this type only handles power and other specific things.
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 5
|
||||
///A flag that describes this device type
|
||||
var/hardware_flag = 0
|
||||
///Power usage during last tick
|
||||
var/last_power_usage = 0
|
||||
|
||||
|
||||
///Icon state when the computer is turned off.
|
||||
var/icon_state_unpowered = null
|
||||
///Icon state when the computer is turned on.
|
||||
var/icon_state_powered = null
|
||||
///Icon state overlay when the computer is turned on, but no program is loaded that would override the screen.
|
||||
var/screen_icon_state_menu = "menu"
|
||||
///Icon state overlay when the computer is powered, but not 'switched on'.
|
||||
var/screen_icon_screensaver = "standby"
|
||||
///Maximal hardware size. Currently, tablets have 1, laptops 2 and consoles 3. Limits what hardware types can be installed.
|
||||
var/max_hardware_size = 0
|
||||
///Amount of steel sheets refunded when disassembling an empty frame of this computer.
|
||||
var/steel_sheet_cost = 10
|
||||
///Light luminosity when turned on
|
||||
var/light_strength = 0
|
||||
///Power usage when the computer is open (screen is active) and can be interacted with. Remember hardware can use power too.
|
||||
var/base_active_power_usage = 100
|
||||
///Power usage when the computer is idle and screen is off (currently only applies to laptops)
|
||||
var/base_idle_power_usage = 10
|
||||
|
||||
///CPU that handles most logic while this type only handles power and other specific things.
|
||||
var/obj/item/modular_computer/processor/cpu = null
|
||||
|
||||
/obj/machinery/modular_computer/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
light_strength = 2
|
||||
max_integrity = 300
|
||||
integrity_failure = 0.5
|
||||
var/console_department = "" // Used in New() to set network tag according to our area.
|
||||
///Used in New() to set network tag according to our area.
|
||||
var/console_department = ""
|
||||
|
||||
/obj/machinery/modular_computer/console/buildable/Initialize()
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user