Backend: Added Wristbound Computers (#8241)

This commit is contained in:
Geeves
2020-02-20 00:48:53 +02:00
committed by GitHub
parent 0e6ae20417
commit c86b625b80
6 changed files with 75 additions and 2 deletions

View File

@@ -2031,11 +2031,13 @@
#include "code\modules\modular_computers\computers\subtypes\dev_silicon.dm"
#include "code\modules\modular_computers\computers\subtypes\dev_tablet.dm"
#include "code\modules\modular_computers\computers\subtypes\dev_telescreen.dm"
#include "code\modules\modular_computers\computers\subtypes\dev_wristbound.dm"
#include "code\modules\modular_computers\computers\subtypes\preset_console.dm"
#include "code\modules\modular_computers\computers\subtypes\preset_laptop.dm"
#include "code\modules\modular_computers\computers\subtypes\preset_silicon.dm"
#include "code\modules\modular_computers\computers\subtypes\preset_tablet.dm"
#include "code\modules\modular_computers\computers\subtypes\preset_telescreen.dm"
#include "code\modules\modular_computers\computers\subtypes\preset_wristbound.dm"
#include "code\modules\modular_computers\file_system\computer_file.dm"
#include "code\modules\modular_computers\file_system\data.dm"
#include "code\modules\modular_computers\file_system\news_article.dm"

View File

@@ -182,9 +182,10 @@
#define PROGRAM_TABLET 4
#define PROGRAM_TELESCREEN 8
#define PROGRAM_SILICON 16
#define PROGRAM_WRISTBOUND 32
#define PROGRAM_ALL (PROGRAM_CONSOLE | PROGRAM_LAPTOP | PROGRAM_TABLET | PROGRAM_TELESCREEN | PROGRAM_SILICON)
#define PROGRAM_ALL_REGULAR (PROGRAM_CONSOLE | PROGRAM_LAPTOP | PROGRAM_TABLET | PROGRAM_TELESCREEN)
#define PROGRAM_ALL (PROGRAM_CONSOLE | PROGRAM_LAPTOP | PROGRAM_TABLET | PROGRAM_WRISTBOUND | PROGRAM_TELESCREEN | PROGRAM_SILICON)
#define PROGRAM_ALL_REGULAR (PROGRAM_CONSOLE | PROGRAM_LAPTOP | PROGRAM_TABLET | PROGRAM_WRISTBOUND | PROGRAM_TELESCREEN)
#define PROGRAM_STATE_KILLED 0
#define PROGRAM_STATE_BACKGROUND 1

View File

@@ -0,0 +1,40 @@
/obj/item/modular_computer/wristbound
name = "wristbound computer"
desc = "A portable wristbound device for your needs on the go. Quite comfortable."
description_info = "A NanoTrasen design, this wristbound computer allows the user to quickly and safely access critical info, without taking their hands out of the equation."
icon = 'icons/obj/modular_wristbound.dmi'
icon_state = "wristbound"
icon_state_unpowered = "wristbound_unpowered"
icon_state_menu = "menu"
icon_state_screensaver = "standby"
hardware_flag = PROGRAM_WRISTBOUND
slot_flags = SLOT_GLOVES
max_hardware_size = 1
w_class = ITEMSIZE_NORMAL
light_strength = 1
menu_light_color = COLOR_GREEN
/obj/item/modular_computer/wristbound/attack_hand(mob/user)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.gloves == src)
return attack_self(user)
..()
/obj/item/modular_computer/wristbound/MouseDrop(obj/over_object)
var/mob/living/carbon/user = usr
if(!ishuman(user) || !issmall(user))
return
switch(over_object.name)
if(BP_R_HAND)
user.u_equip(src)
user.put_in_r_hand(src, FALSE)
if(BP_L_HAND)
user.u_equip(src)
user.put_in_l_hand(src, FALSE)
/obj/item/modular_computer/wristbound/AltClick(mob/user)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.gloves == src)
H.unEquip(src)

View File

@@ -0,0 +1,24 @@
/obj/item/modular_computer/wristbound/preset/custom_loadout/cheap/install_default_hardware()
..()
processor_unit = new /obj/item/computer_hardware/processor_unit/small(src)
hard_drive = new /obj/item/computer_hardware/hard_drive/micro(src)
network_card = new /obj/item/computer_hardware/network_card(src)
battery_module = new /obj/item/computer_hardware/battery_module/nano(src)
battery_module.charge_to_full()
/obj/item/modular_computer/wristbound/preset/custom_loadout/advanced/install_default_hardware()
..()
processor_unit = new /obj/item/computer_hardware/processor_unit/small(src)
hard_drive = new /obj/item/computer_hardware/hard_drive/small(src)
network_card = new /obj/item/computer_hardware/network_card(src)
nano_printer = new /obj/item/computer_hardware/nano_printer(src)
card_slot = new /obj/item/computer_hardware/card_slot(src)
battery_module = new /obj/item/computer_hardware/battery_module(src)
battery_module.charge_to_full()
// Cargo Delivery
/obj/item/modular_computer/wristbound/preset/custom_loadout/advanced/cargo_delivery
icon_state = "wristbound_supply"
_app_preset_type = /datum/modular_computer_app_presets/cargo_delivery
enrolled = TRUE

View File

@@ -0,0 +1,6 @@
author: Geeves
delete-after: True
changes:
- backend: "Added wristbound computers, to be used in future developments."

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB