Removes tablets (not PDAs) entirely. (#71507)

## About The Pull Request

**Comes with an UpdatePaths!**

Removes the tablet subtype, PDAs now replaces them entirely.

Nukie and Silicon tablets are now subtypes of the PDA instead, while
contractor ones were removed entirely as they didn't do anything and
were unused (though it wouldn't be hard to re-add).

Nukie PDAs are now the only type of PDA that uses modular_tablets.dmi,
which is just larger icons of modular_pda. Each application requires an
icon state in both of these, for 2 different sizes, which makes it
annoying to make new applications, especially if it can also run on
computers/laptops.

### Icons

Because Silicon tablets are now a subtype of PDA, they use PDA icons
instead of tablet ones. Luckily for us, they already exist in code.

![image](https://user-images.githubusercontent.com/53777086/203876575-56eb1593-774c-47c6-8e7d-491a7805f28c.png)

AI's don't use a tablet icon though, so they aren't affected.

## Why It's Good For The Game

There's very little difference between tablets and PDAs, PDAs overshadow
them in every single way, so at this point I don't see why we should
have both of these, and if you compare the two in usefulness and actual
in-game use by players, it's a no-brainer than the item all players get
roundstart and comes with a messenger should be the one we go with.

Also as said in the about section, when making an app you would need to
make icon states for the program running for all hardware it can run on,
which is Computer, Laptop, PDA, and Tablet.

Laptop is just a smaller computer icon
PDA is just a smaller tablet icon

However, you can't simply shrink the size of the icon, instead you have
to completely resprite the same app icon FOUR TIMES for it to not
bluescreen on all these different devices.

<details>
<summary>
Here's examples of it
</summary>
Computer (NOTE: *They share the same icon file as regular computers*)
<img
src="https://user-images.githubusercontent.com/53777086/203876801-486a8054-489a-4983-bdad-a2599b4dc379.png"/>
Laptop
<img
src="https://user-images.githubusercontent.com/53777086/203876333-58e5d135-f4c6-4a02-8948-1df771e294a4.png"/>
Tablet
<img
src="https://user-images.githubusercontent.com/53777086/203876352-816c7fb1-c681-40b9-99e0-052f49632c7f.png"/>
PDA
<img
src="https://user-images.githubusercontent.com/53777086/203876358-1cf7253d-3c6a-456a-8133-ebf7f0351637.png"/>
</details>

If we wish to help in simplifying this, we should remove tablet icons
entirely, which means 1 less icon to worry about. To do this, we'd need
to resprite nukie PDAs, however I am very much not a spriter and never
tried GAGS, so I'll leave it to someone else to do.

## Changelog

🆑
del: Tablets are now removed, PDAs are now the base 'tablet'. Silicon
and nukie tablets are now PDAs.
/🆑
This commit is contained in:
John Willard
2022-12-02 00:15:14 -08:00
committed by GitHub
parent 790db996b0
commit 2425531eb2
93 changed files with 362 additions and 396 deletions
@@ -50,8 +50,6 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
var/hardware_flag = NONE
// Options: PROGRAM_ALL | PROGRAM_CONSOLE | PROGRAM_LAPTOP | PROGRAM_TABLET
///Whether the icon state should be bypassed entirely, used for PDAs.
var/bypass_state = FALSE
///The theme, used for the main menu and file browser apps.
var/device_theme = "ntos"
@@ -83,10 +81,12 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
// 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.
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/icon_state_menu = "menu" // Icon state overlay when the computer is turned on, but no program is loaded that would override the screen.
var/display_overlays = TRUE // If FALSE, don't draw overlays on this device at all
///If set, what the icon_state will be if the computer is unpowered.
var/icon_state_unpowered
///If set, what the icon_state will be if the computer is powered.
var/icon_state_powered
///Icon state overlay when the computer is turned on, but no program is loaded (programs override this).
var/icon_state_menu = "menu"
///The full name of the stored ID card's identity. These vars should probably be on the PDA.
var/saved_identification
@@ -382,18 +382,16 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
return . || NONE
/obj/item/modular_computer/update_icon_state()
if(!bypass_state)
icon_state = enabled ? icon_state_powered : icon_state_unpowered
if(!icon_state_powered || !icon_state_unpowered) //no valid icon, don't update.
return ..()
icon_state = enabled ? icon_state_powered : icon_state_unpowered
return ..()
/obj/item/modular_computer/update_overlays()
. = ..()
var/init_icon = initial(icon)
if(!init_icon)
return
if(!display_overlays)
return
if(enabled)
. += active_program ? mutable_appearance(init_icon, active_program.program_icon_state) : mutable_appearance(init_icon, icon_state_menu)
@@ -493,7 +491,6 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
active_program.ntnet_status = get_ntnet_status()
handle_power(delta_time) // Handles all computer power interaction
//check_update_ui_need()
/**
* Displays notification text alongside a soundbeep when requested to by a program.
@@ -46,5 +46,5 @@
return FALSE
//Integrated (Silicon) tablets don't drain power, because the tablet is required to state laws, so it being disabled WILL cause problems.
/obj/item/modular_computer/tablet/integrated/check_power_override()
/obj/item/modular_computer/pda/silicon/check_power_override()
return TRUE
@@ -50,7 +50,7 @@
. = ..()
var/list/data = list()
data["show_imprint"] = istype(src, /obj/item/modular_computer/tablet)
data["show_imprint"] = istype(src, /obj/item/modular_computer/pda)
return data
@@ -9,7 +9,7 @@
///How many charges the virus has left
var/charges = 5
/obj/item/computer_disk/virus/proc/send_virus(obj/item/modular_computer/tablet/source, obj/item/modular_computer/tablet/target, mob/living/user)
/obj/item/computer_disk/virus/proc/send_virus(obj/item/modular_computer/pda/source, obj/item/modular_computer/pda/target, mob/living/user)
if(charges <= 0)
to_chat(user, span_notice("ERROR: Out of charges."))
return FALSE
@@ -26,7 +26,7 @@
/obj/item/computer_disk/virus/clown
name = "\improper H.O.N.K. disk"
/obj/item/computer_disk/virus/clown/send_virus(obj/item/modular_computer/tablet/source, obj/item/modular_computer/tablet/target, mob/living/user)
/obj/item/computer_disk/virus/clown/send_virus(obj/item/modular_computer/pda/source, obj/item/modular_computer/pda/target, mob/living/user)
. = ..()
if(!.)
return FALSE
@@ -43,7 +43,7 @@
/obj/item/computer_disk/virus/mime
name = "\improper sound of silence disk"
/obj/item/computer_disk/virus/mime/send_virus(obj/item/modular_computer/tablet/source, obj/item/modular_computer/tablet/target, mob/living/user)
/obj/item/computer_disk/virus/mime/send_virus(obj/item/modular_computer/pda/source, obj/item/modular_computer/pda/target, mob/living/user)
. = ..()
if(!.)
return FALSE
@@ -64,7 +64,7 @@
name = "\improper D.E.T.O.M.A.T.I.X. disk"
charges = 6
/obj/item/computer_disk/virus/detomatix/send_virus(obj/item/modular_computer/tablet/source, obj/item/modular_computer/tablet/target, mob/living/user)
/obj/item/computer_disk/virus/detomatix/send_virus(obj/item/modular_computer/pda/source, obj/item/modular_computer/pda/target, mob/living/user)
. = ..()
if(!.)
return FALSE
@@ -120,7 +120,7 @@
telecrystal_stack.use(telecrystal_stack.amount)
/obj/item/computer_disk/virus/frame/send_virus(obj/item/modular_computer/tablet/target, mob/living/user)
/obj/item/computer_disk/virus/frame/send_virus(obj/item/modular_computer/pda/target, mob/living/user)
. = ..()
if(!.)
return FALSE
@@ -7,7 +7,6 @@
icon_state_powered = "laptop"
icon_state_unpowered = "laptop-off"
icon_state_menu = "menu"
display_overlays = FALSE
hardware_flag = PROGRAM_LAPTOP
max_idle_programs = 3
@@ -111,7 +110,6 @@
w_class = w_class_open
screen_on = !screen_on
display_overlays = screen_on
update_appearance()
@@ -1,31 +1,42 @@
/obj/item/modular_computer/tablet //Its called tablet for theme of 90ies but actually its a "big smartphone" sized
name = "tablet computer"
icon = 'icons/obj/modular_tablet.dmi'
icon_state = "tablet-red"
icon_state_unpowered = "tablet-red"
icon_state_powered = "tablet-red"
icon_state_menu = "menu"
inhand_icon_state = "electronic"
/obj/item/modular_computer/pda
name = "pda"
icon = 'icons/obj/modular_pda.dmi'
icon_state = "pda"
worn_icon_state = "pda"
base_icon_state = "tablet"
greyscale_config = /datum/greyscale_config/tablet
greyscale_colors = "#999875#a92323"
lefthand_file = 'icons/mob/inhands/items/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items/devices_righthand.dmi'
base_icon_state = "tablet"
worn_icon_state = "tablet"
hardware_flag = PROGRAM_TABLET
max_idle_programs = 2
w_class = WEIGHT_CLASS_SMALL
inhand_icon_state = "electronic"
steel_sheet_cost = 2
slot_flags = ITEM_SLOT_ID | ITEM_SLOT_BELT
has_light = TRUE //LED flashlight!
comp_light_luminosity = 2.3 //Same as the PDA
looping_sound = FALSE
custom_materials = list(/datum/material/iron=300, /datum/material/glass=100, /datum/material/plastic=100)
interaction_flags_atom = INTERACT_ATOM_ALLOW_USER_LOCATION
var/has_variants = TRUE
var/finish_color = null
icon_state_menu = "menu"
max_capacity = 64
allow_chunky = TRUE
hardware_flag = PROGRAM_TABLET
max_idle_programs = 2
w_class = WEIGHT_CLASS_SMALL
slot_flags = ITEM_SLOT_ID | ITEM_SLOT_BELT
has_light = TRUE //LED flashlight!
comp_light_luminosity = 2.3 //this is what old PDAs were set to
looping_sound = FALSE
///The item currently inserted into the PDA, starts with a pen.
var/obj/item/inserted_item = /obj/item/pen
///Whether the PDA should have 'pda_programs' apps installed on Initialize.
var/has_pda_programs = TRUE
///Static list of default PDA apps to install on Initialize.
var/static/list/datum/computer_file/pda_programs = list(
/datum/computer_file/program/messenger,
/datum/computer_file/program/nt_pay,
/datum/computer_file/program/notepad,
)
///List of items that can be stored in a PDA
var/static/list/contained_item = list(
/obj/item/pen,
@@ -35,24 +46,43 @@
/obj/item/clothing/mask/cigarette,
)
/obj/item/modular_computer/tablet/Initialize(mapload)
/obj/item/modular_computer/pda/Initialize(mapload)
. = ..()
if(inserted_item)
inserted_item = new inserted_item(src)
/obj/item/modular_computer/tablet/Destroy()
/obj/item/modular_computer/pda/Destroy()
if(istype(inserted_item))
QDEL_NULL(inserted_item)
return ..()
/obj/item/modular_computer/tablet/update_icon_state()
if(has_variants && !bypass_state)
if(!finish_color)
finish_color = pick("red", "blue", "brown", "green", "black")
icon_state = icon_state_powered = icon_state_unpowered = "[base_icon_state]-[finish_color]"
return ..()
/obj/item/modular_computer/pda/install_default_programs()
var/list/apps_to_download = list()
if(has_pda_programs)
apps_to_download += default_programs + pda_programs
apps_to_download += starting_programs
/obj/item/modular_computer/tablet/attack_self(mob/user)
for(var/programs as anything in apps_to_download)
var/datum/computer_file/program/program_type = new programs
store_file(program_type)
/obj/item/modular_computer/pda/update_overlays()
. = ..()
if(computer_id_slot)
. += mutable_appearance(initial(icon), "id_overlay")
if(light_on)
. += mutable_appearance(initial(icon), "light_overlay")
/obj/item/modular_computer/pda/attack_ai(mob/user)
to_chat(user, span_notice("It doesn't feel right to snoop around like that..."))
return // we don't want ais or cyborgs using a private role tablet
/obj/item/modular_computer/pda/interact(mob/user)
. = ..()
if(HAS_TRAIT(src, TRAIT_PDA_MESSAGE_MENU_RIGGED))
explode(usr, from_message_menu = TRUE)
/obj/item/modular_computer/pda/attack_self(mob/user)
// bypass literacy checks to access syndicate uplink
var/datum/component/uplink/hidden_uplink = GetComponent(/datum/component/uplink)
if(hidden_uplink?.owner && HAS_TRAIT(user, TRAIT_ILLITERATE))
@@ -65,7 +95,7 @@
return ..()
/obj/item/modular_computer/tablet/pre_attack(atom/target, mob/living/user, params)
/obj/item/modular_computer/pda/pre_attack(atom/target, mob/living/user, params)
if(!inserted_disk || !ismachinery(target))
return ..()
@@ -93,12 +123,7 @@
)
return TRUE
/obj/item/modular_computer/tablet/interact(mob/user)
. = ..()
if(HAS_TRAIT(src, TRAIT_PDA_MESSAGE_MENU_RIGGED))
explode(usr, from_message_menu = TRUE)
/obj/item/modular_computer/tablet/add_context(atom/source, list/context, obj/item/held_item, mob/user)
/obj/item/modular_computer/pda/add_context(atom/source, list/context, obj/item/held_item, mob/user)
. = ..()
if(inserted_item)
@@ -110,30 +135,31 @@
return . || NONE
/obj/item/modular_computer/tablet/attackby(obj/item/W, mob/user)
/obj/item/modular_computer/pda/attackby(obj/item/attacking_item, mob/user, params)
. = ..()
if(is_type_in_list(W, contained_item))
if(W.w_class >= WEIGHT_CLASS_SMALL) // Anything equal to or larger than small won't work
user.balloon_alert(user, "too big!")
return
if(inserted_item)
balloon_alert(user, "no room!")
else
if(!user.transferItemToLoc(W, src))
return
balloon_alert(user, "inserted [W]")
inserted_item = W
playsound(src, 'sound/machines/pda_button1.ogg', 50, TRUE)
if(!is_type_in_list(attacking_item, contained_item))
return
if(attacking_item.w_class >= WEIGHT_CLASS_SMALL) // Anything equal to or larger than small won't work
user.balloon_alert(user, "too big!")
return
if(inserted_item)
balloon_alert(user, "no room!")
return
if(!user.transferItemToLoc(attacking_item, src))
return
balloon_alert(user, "inserted [attacking_item]")
inserted_item = attacking_item
playsound(src, 'sound/machines/pda_button1.ogg', 50, TRUE)
/obj/item/modular_computer/tablet/AltClick(mob/user)
/obj/item/modular_computer/pda/AltClick(mob/user)
. = ..()
if(.)
return
remove_pen(user)
/obj/item/modular_computer/tablet/CtrlClick(mob/user)
/obj/item/modular_computer/pda/CtrlClick(mob/user)
. = ..()
if(.)
return
@@ -141,7 +167,7 @@
remove_pen(user)
///Finds how hard it is to send a virus to this tablet, checking all programs downloaded.
/obj/item/modular_computer/tablet/proc/get_detomatix_difficulty()
/obj/item/modular_computer/pda/proc/get_detomatix_difficulty()
var/detomatix_difficulty
for(var/datum/computer_file/program/downloaded_apps as anything in stored_files)
@@ -149,11 +175,7 @@
return detomatix_difficulty
/obj/item/modular_computer/tablet/proc/tab_no_detonate()
SIGNAL_HANDLER
return COMPONENT_TABLET_NO_DETONATE
/obj/item/modular_computer/tablet/proc/remove_pen(mob/user)
/obj/item/modular_computer/pda/proc/remove_pen(mob/user)
if(issilicon(user) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE)) //TK doesn't work even with this removed but here for readability
return
@@ -165,10 +187,8 @@
update_appearance()
playsound(src, 'sound/machines/pda_button2.ogg', 50, TRUE)
// Tablet 'splosion..
/obj/item/modular_computer/tablet/proc/explode(mob/target, mob/bomber, from_message_menu = FALSE)
var/turf/T = get_turf(src)
/obj/item/modular_computer/pda/proc/explode(mob/target, mob/bomber, from_message_menu = FALSE)
var/turf/current_turf = get_turf(src)
if(from_message_menu)
log_bomber(null, null, target, "'s tablet exploded as [target.p_they()] tried to open their tablet message menu because of a recent tablet bomb.")
@@ -176,15 +196,20 @@
log_bomber(bomber, "successfully tablet-bombed", target, "as [target.p_they()] tried to reply to a rigged tablet message [bomber && !is_special_character(bomber) ? "(SENT BY NON-ANTAG)" : ""]")
if (ismob(loc))
var/mob/M = loc
M.show_message(span_userdanger("Your [src] explodes!"), MSG_VISUAL, span_warning("You hear a loud *pop*!"), MSG_AUDIBLE)
var/mob/loc_mob = loc
loc_mob.show_message(
msg = span_userdanger("Your [src] explodes!"),
type = MSG_VISUAL,
alt_msg = span_warning("You hear a loud *pop*!"),
alt_type = MSG_AUDIBLE,
)
else
visible_message(span_danger("[src] explodes!"), span_warning("You hear a loud *pop*!"))
target.client?.give_award(/datum/award/achievement/misc/clickbait, target)
if(T)
T.hotspot_expose(700,125)
if(current_turf)
current_turf.hotspot_expose(700,125)
if(istype(inserted_disk, /obj/item/computer_disk/virus/detomatix))
explosion(src, devastation_range = -1, heavy_impact_range = 1, light_impact_range = 3, flash_range = 4)
else
@@ -199,7 +224,7 @@
* Arguments:
* * ringtone_client - The client whose prefs we'll use to set the ringtone of this PDA.
*/
/obj/item/modular_computer/tablet/proc/update_ringtone_pref(client/ringtone_client)
/obj/item/modular_computer/pda/proc/update_ringtone_pref(client/ringtone_client)
if(!ringtone_client)
return
@@ -210,56 +235,58 @@
update_ringtone(new_ringtone)
/// A simple proc to set the ringtone from a pda.
/obj/item/modular_computer/tablet/proc/update_ringtone(new_ringtone)
/obj/item/modular_computer/pda/proc/update_ringtone(new_ringtone)
if(!istext(new_ringtone))
return
for(var/datum/computer_file/program/messenger/messenger_app in stored_files)
messenger_app.ringtone = new_ringtone
// SUBTYPES
/obj/item/modular_computer/tablet/syndicate_contract_uplink
name = "contractor tablet"
icon = 'icons/obj/contractor_tablet.dmi'
icon_state = "tablet"
icon_state_unpowered = "tablet"
icon_state_powered = "tablet"
icon_state_menu = "assign"
w_class = WEIGHT_CLASS_SMALL
slot_flags = ITEM_SLOT_ID | ITEM_SLOT_BELT
comp_light_luminosity = 6.3
has_variants = FALSE
/// Given to Nuke Ops members.
/obj/item/modular_computer/tablet/nukeops
/**
* Nuclear PDA
*
* PDA that doesn't come with the default apps but has Fission360
* Resistant to emags, these are given to nukies for disk pinpointer stuff.
*/
/obj/item/modular_computer/pda/nukeops
name = "nuclear pda"
icon = 'icons/obj/modular_tablet.dmi'
icon_state = "tablet-syndicate"
icon_state_powered = "tablet-syndicate"
icon_state_unpowered = "tablet-syndicate"
comp_light_luminosity = 6.3
has_variants = FALSE
device_theme = "syndicate"
comp_light_luminosity = 6.3
light_color = COLOR_RED
has_pda_programs = FALSE
greyscale_config = null
greyscale_colors = null
/obj/item/modular_computer/tablet/nukeops/emag_act(mob/user)
starting_programs = list(
/datum/computer_file/program/ntnetdownload/syndicate,
/datum/computer_file/program/radar/fission360,
)
/obj/item/modular_computer/pda/nukeops/emag_act(mob/user)
if(!enabled)
to_chat(user, span_warning("You'd need to turn the [src] on first."))
return FALSE
to_chat(user, span_notice("You swipe \the [src]. It's screen briefly shows a message reading \"MEMORY CODE INJECTION DETECTED AND SUCCESSFULLY QUARANTINED\"."))
return FALSE
/// Borg Built-in tablet interface
/obj/item/modular_computer/tablet/integrated
/**
* Silicon PDA
*
* PDAs that are built-in to Silicons and should not exist at any point without being inside of one.
*/
/obj/item/modular_computer/pda/silicon
name = "modular interface"
icon_state = "tablet-silicon"
icon_state_powered = "tablet-silicon"
icon_state_unpowered = "tablet-silicon"
base_icon_state = "tablet-silicon"
greyscale_config = null
greyscale_colors = null
has_light = FALSE //tablet light button actually enables/disables the borg lamp
comp_light_luminosity = 0
has_variants = FALSE
inserted_item = null
has_pda_programs = FALSE
starting_programs = list(
/datum/computer_file/program/messenger,
)
@@ -271,14 +298,14 @@
///Ref to the silicon we're installed in. Set by the silicon itself during its creation.
var/mob/living/silicon/silicon_owner
/obj/item/modular_computer/tablet/integrated/cyborg
/obj/item/modular_computer/pda/silicon/cyborg
starting_programs = list(
/datum/computer_file/program/computerconfig,
/datum/computer_file/program/filemanager,
/datum/computer_file/program/robotact,
)
/obj/item/modular_computer/tablet/integrated/Initialize(mapload)
/obj/item/modular_computer/pda/silicon/Initialize(mapload)
. = ..()
vis_flags |= VIS_INHERIT_ID
silicon_owner = loc
@@ -287,21 +314,16 @@
stack_trace("[type] initialized outside of a silicon, deleting.")
return INITIALIZE_HINT_QDEL
/obj/item/modular_computer/tablet/integrated/install_default_programs()
for(var/programs in starting_programs)
var/datum/computer_file/program/program_type = new programs
store_file(program_type)
/obj/item/modular_computer/tablet/integrated/Destroy()
/obj/item/modular_computer/pda/silicon/Destroy()
silicon_owner = null
return ..()
/obj/item/modular_computer/tablet/integrated/turn_on(mob/user, open_ui = FALSE)
/obj/item/modular_computer/pda/silicon/turn_on(mob/user, open_ui = FALSE)
if(silicon_owner?.stat != DEAD)
return ..()
return FALSE
/obj/item/modular_computer/tablet/integrated/get_ntnet_status(specific_action = 0)
/obj/item/modular_computer/pda/silicon/get_ntnet_status(specific_action = 0)
//No borg found
if(!silicon_owner)
return FALSE
@@ -328,7 +350,7 @@
* the new copy (such as due to lack of space), the proc will crash with an error.
* RoboTact is supposed to be undeletable, so these will create runtime messages.
*/
/obj/item/modular_computer/tablet/integrated/proc/get_robotact()
/obj/item/modular_computer/pda/silicon/proc/get_robotact()
if(robotact)
return robotact
robotact = find_file_by_name("robotact")
@@ -343,7 +365,7 @@
CRASH("Cyborg [silicon_owner]'s tablet hard drive rejected recieving a new copy of the self-manage app. To fix, check the hard drive's space remaining. Please make a bug report about this.")
//Makes the light settings reflect the borg's headlamp settings
/obj/item/modular_computer/tablet/integrated/cyborg/ui_data(mob/user)
/obj/item/modular_computer/pda/silicon/cyborg/ui_data(mob/user)
. = ..()
.["has_light"] = TRUE
if(iscyborg(silicon_owner))
@@ -352,7 +374,7 @@
.["comp_light_color"] = robo.lamp_color
//Makes the flashlight button affect the borg rather than the tablet
/obj/item/modular_computer/tablet/integrated/toggle_flashlight()
/obj/item/modular_computer/pda/silicon/toggle_flashlight()
if(!silicon_owner || QDELETED(silicon_owner))
return FALSE
if(iscyborg(silicon_owner))
@@ -361,7 +383,7 @@
return TRUE
//Makes the flashlight color setting affect the borg rather than the tablet
/obj/item/modular_computer/tablet/integrated/set_flashlight_color(color)
/obj/item/modular_computer/pda/silicon/set_flashlight_color(color)
if(!silicon_owner || QDELETED(silicon_owner) || !color)
return FALSE
if(iscyborg(silicon_owner))
@@ -370,55 +392,15 @@
robo.toggle_headlamp(FALSE, TRUE)
return TRUE
/obj/item/modular_computer/tablet/integrated/ui_state(mob/user)
/obj/item/modular_computer/pda/silicon/ui_state(mob/user)
return GLOB.reverse_contained_state
/obj/item/modular_computer/tablet/integrated/cyborg/syndicate
/obj/item/modular_computer/pda/silicon/cyborg/syndicate
icon_state = "tablet-silicon-syndicate"
icon_state_powered = "tablet-silicon-syndicate"
icon_state_unpowered = "tablet-silicon-syndicate"
device_theme = "syndicate"
/obj/item/modular_computer/tablet/integrated/cyborg/syndicate/Initialize(mapload)
/obj/item/modular_computer/pda/silicon/cyborg/syndicate/Initialize(mapload)
. = ..()
if(iscyborg(silicon_owner))
var/mob/living/silicon/robot/robo = silicon_owner
robo.lamp_color = COLOR_RED //Syndicate likes it red
// Round start tablets
/obj/item/modular_computer/tablet/pda
icon = 'icons/obj/modular_pda.dmi'
icon_state = "pda"
worn_icon_state = "pda"
greyscale_config = /datum/greyscale_config/tablet
greyscale_colors = "#999875#a92323"
max_capacity = 64
bypass_state = TRUE
allow_chunky = TRUE
///Static list of default PDA apps to install on Initialize.
var/static/list/datum/computer_file/pda_programs = list(
/datum/computer_file/program/messenger,
/datum/computer_file/program/nt_pay,
/datum/computer_file/program/notepad,
)
/obj/item/modular_computer/tablet/pda/install_default_programs()
for(var/programs as anything in (default_programs + pda_programs + starting_programs))
var/datum/computer_file/program/program_type = new programs
store_file(program_type)
/obj/item/modular_computer/tablet/pda/update_overlays()
. = ..()
if(computer_id_slot)
. += mutable_appearance(initial(icon), "id_overlay")
if(light_on)
. += mutable_appearance(initial(icon), "light_overlay")
/obj/item/modular_computer/tablet/pda/attack_ai(mob/user)
to_chat(user, span_notice("It doesn't feel right to snoop around like that..."))
return // we don't want ais or cyborgs using a private role tablet
@@ -2,7 +2,7 @@
* Command
*/
/obj/item/modular_computer/tablet/pda/heads
/obj/item/modular_computer/pda/heads
greyscale_config = /datum/greyscale_config/tablet/head
greyscale_colors = "#67A364#a92323"
starting_programs = list(
@@ -13,19 +13,23 @@
/datum/computer_file/program/budgetorders,
)
/obj/item/modular_computer/tablet/pda/heads/captain
/obj/item/modular_computer/pda/heads/captain
name = "captain PDA"
greyscale_config = /datum/greyscale_config/tablet/captain
greyscale_colors = "#2C7CB2#FF0000#FFFFFF#FFD55B"
inserted_item = /obj/item/pen/fountain/captain
/obj/item/modular_computer/tablet/pda/heads/captain/Initialize(mapload)
/obj/item/modular_computer/pda/heads/captain/Initialize(mapload)
. = ..()
RegisterSignal(src, COMSIG_TABLET_CHECK_DETONATE, PROC_REF(tab_no_detonate))
for(var/datum/computer_file/program/messenger/messenger_app in stored_files)
messenger_app.spam_mode = TRUE
/obj/item/modular_computer/tablet/pda/heads/hop
/obj/item/modular_computer/pda/heads/captain/proc/tab_no_detonate()
SIGNAL_HANDLER
return COMPONENT_TABLET_NO_DETONATE
/obj/item/modular_computer/pda/heads/hop
name = "head of personnel PDA"
greyscale_config = /datum/greyscale_config/tablet/stripe_thick/head
greyscale_colors = "#374f7e#a52f29#a52f29"
@@ -39,7 +43,7 @@
/datum/computer_file/program/job_management,
)
/obj/item/modular_computer/tablet/pda/heads/hos
/obj/item/modular_computer/pda/heads/hos
name = "head of security PDA"
greyscale_config = /datum/greyscale_config/tablet/head
greyscale_colors = "#EA3232#0000CC"
@@ -52,7 +56,7 @@
/datum/computer_file/program/records/security,
)
/obj/item/modular_computer/tablet/pda/heads/ce
/obj/item/modular_computer/pda/heads/ce
name = "chief engineer PDA"
greyscale_config = /datum/greyscale_config/tablet/stripe_thick/head
greyscale_colors = "#D99A2E#69DBF3#FAFAFA"
@@ -67,7 +71,7 @@
/datum/computer_file/program/supermatter_monitor,
)
/obj/item/modular_computer/tablet/pda/heads/cmo
/obj/item/modular_computer/pda/heads/cmo
name = "chief medical officer PDA"
greyscale_config = /datum/greyscale_config/tablet/stripe_thick/head
greyscale_colors = "#FAFAFA#000099#3F96CC"
@@ -81,7 +85,7 @@
/datum/computer_file/program/records/medical,
)
/obj/item/modular_computer/tablet/pda/heads/rd
/obj/item/modular_computer/pda/heads/rd
name = "research director PDA"
greyscale_config = /datum/greyscale_config/tablet/stripe_thick/head
greyscale_colors = "#FAFAFA#000099#B347BC"
@@ -96,7 +100,7 @@
/datum/computer_file/program/signal_commander,
)
/obj/item/modular_computer/tablet/pda/heads/quartermaster
/obj/item/modular_computer/pda/heads/quartermaster
name = "quartermaster PDA"
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
greyscale_colors = "#D6B328#6506CA#927444"
@@ -116,7 +120,7 @@
* Security
*/
/obj/item/modular_computer/tablet/pda/security
/obj/item/modular_computer/pda/security
name = "security PDA"
greyscale_colors = "#EA3232#0000cc"
starting_programs = list(
@@ -125,7 +129,7 @@
/datum/computer_file/program/robocontrol,
)
/obj/item/modular_computer/tablet/pda/detective
/obj/item/modular_computer/pda/detective
name = "detective PDA"
greyscale_colors = "#805A2F#990202"
starting_programs = list(
@@ -135,7 +139,7 @@
/datum/computer_file/program/phys_scanner/medical,
)
/obj/item/modular_computer/tablet/pda/warden
/obj/item/modular_computer/pda/warden
name = "warden PDA"
greyscale_config = /datum/greyscale_config/tablet/stripe_split
greyscale_colors = "#EA3232#0000CC#363636"
@@ -149,7 +153,7 @@
* Engineering
*/
/obj/item/modular_computer/tablet/pda/engineering
/obj/item/modular_computer/pda/engineering
name = "engineering PDA"
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
greyscale_colors = "#D99A2E#69DBF3#E3DF3D"
@@ -157,7 +161,7 @@
/datum/computer_file/program/supermatter_monitor,
)
/obj/item/modular_computer/tablet/pda/atmos
/obj/item/modular_computer/pda/atmos
name = "atmospherics PDA"
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
greyscale_colors = "#EEDC43#00E5DA#727272"
@@ -170,7 +174,7 @@
* Science
*/
/obj/item/modular_computer/tablet/pda/science
/obj/item/modular_computer/pda/science
name = "scientist PDA"
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
greyscale_colors = "#FAFAFA#000099#B347BC"
@@ -179,7 +183,7 @@
/datum/computer_file/program/signal_commander,
)
/obj/item/modular_computer/tablet/pda/roboticist
/obj/item/modular_computer/pda/roboticist
name = "roboticist PDA"
greyscale_config = /datum/greyscale_config/tablet/stripe_split
greyscale_colors = "#484848#0099CC#D94927"
@@ -187,7 +191,7 @@
/datum/computer_file/program/robocontrol,
)
/obj/item/modular_computer/tablet/pda/geneticist
/obj/item/modular_computer/pda/geneticist
name = "geneticist PDA"
greyscale_config = /datum/greyscale_config/tablet/stripe_split
greyscale_colors = "#FAFAFA#000099#0097CA"
@@ -200,7 +204,7 @@
* Medical
*/
/obj/item/modular_computer/tablet/pda/medical
/obj/item/modular_computer/pda/medical
name = "medical PDA"
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
greyscale_colors = "#FAFAFA#000099#3F96CC"
@@ -210,7 +214,7 @@
/datum/computer_file/program/robocontrol,
)
/obj/item/modular_computer/tablet/pda/medical/paramedic
/obj/item/modular_computer/pda/medical/paramedic
name = "paramedic PDA"
starting_programs = list(
/datum/computer_file/program/phys_scanner/medical,
@@ -218,7 +222,7 @@
/datum/computer_file/program/radar/lifeline,
)
/obj/item/modular_computer/tablet/pda/viro
/obj/item/modular_computer/pda/viro
name = "virology PDA"
greyscale_config = /datum/greyscale_config/tablet/stripe_split
greyscale_colors = "#FAFAFA#355FAC#57C451"
@@ -228,7 +232,7 @@
/datum/computer_file/program/robocontrol,
)
/obj/item/modular_computer/tablet/pda/chemist
/obj/item/modular_computer/pda/chemist
name = "chemist PDA"
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
greyscale_colors = "#FAFAFA#355FAC#EA6400"
@@ -240,7 +244,7 @@
* Supply
*/
/obj/item/modular_computer/tablet/pda/cargo
/obj/item/modular_computer/pda/cargo
name = "cargo technician PDA"
greyscale_colors = "#D6B328#6506CA"
stored_paper = 20
@@ -250,7 +254,7 @@
/datum/computer_file/program/robocontrol,
)
/obj/item/modular_computer/tablet/pda/shaftminer
/obj/item/modular_computer/pda/shaftminer
name = "shaft miner PDA"
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
greyscale_colors = "#927444#D6B328#6C3BA1"
@@ -262,7 +266,7 @@
* Service
*/
/obj/item/modular_computer/tablet/pda/janitor
/obj/item/modular_computer/pda/janitor
name = "janitor PDA"
greyscale_colors = "#933ea8#235AB2"
starting_programs = list(
@@ -270,12 +274,12 @@
/datum/computer_file/program/radar/custodial_locator,
)
/obj/item/modular_computer/tablet/pda/chaplain
/obj/item/modular_computer/pda/chaplain
name = "chaplain PDA"
greyscale_config = /datum/greyscale_config/tablet/chaplain
greyscale_colors = "#333333#D11818"
/obj/item/modular_computer/tablet/pda/lawyer
/obj/item/modular_computer/pda/lawyer
name = "lawyer PDA"
greyscale_colors = "#4C76C8#FFE243"
inserted_item = /obj/item/pen/fountain
@@ -283,25 +287,25 @@
/datum/computer_file/program/records/security,
)
/obj/item/modular_computer/tablet/pda/lawyer/Initialize(mapload)
/obj/item/modular_computer/pda/lawyer/Initialize(mapload)
. = ..()
for(var/datum/computer_file/program/messenger/messenger_app in stored_files)
messenger_app.spam_mode = TRUE
/obj/item/modular_computer/tablet/pda/botanist
/obj/item/modular_computer/pda/botanist
name = "botanist PDA"
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
greyscale_colors = "#50E193#E26F41#71A7CA"
/obj/item/modular_computer/tablet/pda/cook
/obj/item/modular_computer/pda/cook
name = "cook PDA"
greyscale_colors = "#FAFAFA#A92323"
/obj/item/modular_computer/tablet/pda/bar
/obj/item/modular_computer/pda/bar
name = "bartender PDA"
greyscale_colors = "#333333#C7C7C7"
/obj/item/modular_computer/tablet/pda/clown
/obj/item/modular_computer/pda/clown
name = "clown PDA"
inserted_disk = /obj/item/computer_disk/virus/clown
icon_state = "pda-clown"
@@ -309,26 +313,26 @@
greyscale_colors = null
inserted_item = /obj/item/toy/crayon/rainbow
/obj/item/modular_computer/tablet/pda/clown/Initialize(mapload)
/obj/item/modular_computer/pda/clown/Initialize(mapload)
. = ..()
AddComponent(/datum/component/slippery/clowning, 120, NO_SLIP_WHEN_WALKING, CALLBACK(src, PROC_REF(AfterSlip)), slot_whitelist = list(ITEM_SLOT_ID, ITEM_SLOT_BELT))
AddComponent(/datum/component/wearertargeting/sitcomlaughter, CALLBACK(src, PROC_REF(after_sitcom_laugh)))
/obj/item/modular_computer/tablet/pda/clown/update_overlays()
/obj/item/modular_computer/pda/clown/update_overlays()
. = ..()
. += mutable_appearance(icon, "pda_stripe_clown") // clowns have eyes that go over their screen, so it needs to be compiled last
/obj/item/modular_computer/tablet/pda/clown/proc/AfterSlip(mob/living/carbon/human/M)
/obj/item/modular_computer/pda/clown/proc/AfterSlip(mob/living/carbon/human/M)
if (istype(M) && (M.real_name != saved_identification))
var/obj/item/computer_disk/virus/clown/cart = inserted_disk
if(istype(cart) && cart.charges < 5)
cart.charges++
playsound(src,'sound/machines/ping.ogg',30,TRUE)
/obj/item/modular_computer/tablet/pda/clown/proc/after_sitcom_laugh(mob/victim)
/obj/item/modular_computer/pda/clown/proc/after_sitcom_laugh(mob/victim)
victim.visible_message("[src] lets out a burst of laughter!")
/obj/item/modular_computer/tablet/pda/mime
/obj/item/modular_computer/pda/mime
name = "mime PDA"
inserted_disk = /obj/item/computer_disk/virus/mime
greyscale_config = /datum/greyscale_config/tablet/mime
@@ -338,13 +342,13 @@
/datum/computer_file/program/emojipedia,
)
/obj/item/modular_computer/tablet/pda/mime/Initialize(mapload)
/obj/item/modular_computer/pda/mime/Initialize(mapload)
. = ..()
for(var/datum/computer_file/program/messenger/msg in stored_files)
msg.mime_mode = TRUE
msg.ringer_status = FALSE
/obj/item/modular_computer/tablet/pda/curator
/obj/item/modular_computer/pda/curator
name = "curator PDA"
desc = "A small experimental microcomputer."
greyscale_config = null
@@ -357,7 +361,7 @@
/datum/computer_file/program/newscaster,
)
/obj/item/modular_computer/tablet/pda/curator/Initialize(mapload)
/obj/item/modular_computer/pda/curator/Initialize(mapload)
. = ..()
for(var/datum/computer_file/program/messenger/msg in stored_files)
msg.ringer_status = FALSE
@@ -366,7 +370,7 @@
* No Department
*/
/obj/item/modular_computer/tablet/pda/assistant
/obj/item/modular_computer/pda/assistant
name = "assistant PDA"
starting_programs = list(
/datum/computer_file/program/bounty_board,
@@ -376,20 +380,20 @@
* Non-roles
*/
/obj/item/modular_computer/tablet/pda/syndicate
/obj/item/modular_computer/pda/syndicate
name = "military PDA"
greyscale_colors = "#891417#80FF80"
saved_identification = "John Doe"
saved_job = "Citizen"
device_theme = "syndicate"
/obj/item/modular_computer/tablet/pda/syndicate/Initialize(mapload)
/obj/item/modular_computer/pda/syndicate/Initialize(mapload)
. = ..()
var/datum/computer_file/program/messenger/msg = locate() in stored_files
if(msg)
msg.invisible = TRUE
/obj/item/modular_computer/tablet/pda/clear
/obj/item/modular_computer/pda/clear
name = "clear PDA"
icon_state = "pda-clear"
greyscale_config = null
@@ -1,6 +0,0 @@
/// Given to Nuke Ops members.
/obj/item/modular_computer/tablet/nukeops
starting_programs = list(
/datum/computer_file/program/ntnetdownload/syndicate,
/datum/computer_file/program/radar/fission360,
)