mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-02 13:32:32 +00:00
Adds Librarian Stuff (#8141)
This commit is contained in:
@@ -867,6 +867,7 @@
|
||||
#include "code\game\objects\items\weapons\candle.dm"
|
||||
#include "code\game\objects\items\weapons\cards_ids.dm"
|
||||
#include "code\game\objects\items\weapons\cards_ids_syndicate.dm"
|
||||
#include "code\game\objects\items\weapons\cards_tech_support.dm"
|
||||
#include "code\game\objects\items\weapons\chaplain_items.dm"
|
||||
#include "code\game\objects\items\weapons\chewables.dm"
|
||||
#include "code\game\objects\items\weapons\cigs_lighters.dm"
|
||||
|
||||
@@ -286,6 +286,8 @@
|
||||
selection_color = "#C0C0C0"
|
||||
access = list(access_library, access_maint_tunnels)
|
||||
minimal_access = list(access_library)
|
||||
alt_titles = list("Curator", "Tech Support")
|
||||
alt_outfits = list("Curator" = /datum/outfit/job/librarian/curator, "Tech Support" = /datum/outfit/job/librarian/tech_support)
|
||||
outfit = /datum/outfit/job/librarian
|
||||
|
||||
/datum/outfit/job/librarian
|
||||
@@ -298,3 +300,20 @@
|
||||
l_ear = /obj/item/device/radio/headset/headset_service
|
||||
r_pocket = /obj/item/barcodescanner
|
||||
l_hand = /obj/item/storage/bag/books
|
||||
|
||||
/datum/outfit/job/librarian/curator
|
||||
name = "Curator"
|
||||
jobtype = /datum/job/librarian
|
||||
|
||||
uniform = /obj/item/clothing/under/suit_jacket
|
||||
r_pocket = /obj/item/device/price_scanner
|
||||
l_hand = null
|
||||
|
||||
/datum/outfit/job/librarian/tech_support
|
||||
name = "Tech Support"
|
||||
jobtype = /datum/job/librarian
|
||||
|
||||
uniform = /obj/item/clothing/under/suit_jacket/charcoal
|
||||
l_pocket = /obj/item/modular_computer/tablet/preset/custom_loadout/advanced
|
||||
r_pocket = /obj/item/card/tech_support
|
||||
l_hand = /obj/item/modular_computer/laptop/preset
|
||||
7
code/game/objects/items/weapons/cards_tech_support.dm
Normal file
7
code/game/objects/items/weapons/cards_tech_support.dm
Normal file
@@ -0,0 +1,7 @@
|
||||
/obj/item/card/tech_support
|
||||
name = "tech support card"
|
||||
desc = "A card with a soft metallic sheen. Embedded within is a registered RFID chip."
|
||||
description_info = "Use this on a modular computer to reset it to its original state. Use it on a hard drive to wipe it. Use it on a laptop vendor during the payment phase to vend the device."
|
||||
icon_state = "data"
|
||||
item_state = "card-id"
|
||||
overlay_state = "data"
|
||||
@@ -124,6 +124,19 @@
|
||||
turn_on(user)
|
||||
|
||||
/obj/item/modular_computer/attackby(var/obj/item/W as obj, var/mob/user as mob)
|
||||
if(istype(W, /obj/item/card/tech_support))
|
||||
if(!can_reset)
|
||||
to_chat(user, span("notice", "You cannot reset this type of device."))
|
||||
return
|
||||
if(!enabled)
|
||||
to_chat(user, span("notice", "You cannot reset the device if it isn't powered on."))
|
||||
return
|
||||
if(!hard_drive)
|
||||
to_chat(user, span("notice", "You cannot reset a device that has no hard drive."))
|
||||
return
|
||||
enrolled = 0
|
||||
hard_drive.reset_drive()
|
||||
visible_message("\icon[src.icon] <b>[src]</b> pings, <span class='notice'>\"Enrollment status reset! Have a NanoTrasen day.\"</span>")
|
||||
if(istype(W, /obj/item/card/id)) // ID Card, try to insert it.
|
||||
var/obj/item/card/id/I = W
|
||||
if(!card_slot)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
var/enabled = 0 // Whether the computer is turned on.
|
||||
var/screen_on = 1 // Whether the computer is active/opened/it's screen is on.
|
||||
var/working = 1 // Whether the computer is working.
|
||||
var/can_reset = FALSE // Whether you can reset this device with the tech support card.
|
||||
var/datum/computer_file/program/active_program = null // A currently active program running on the computer.
|
||||
var/hardware_flag = 0 // A flag that describes this device type
|
||||
var/last_power_usage = 0 // Last tick power usage of this computer
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
name = "laptop computer"
|
||||
desc = "A portable computer."
|
||||
hardware_flag = PROGRAM_LAPTOP
|
||||
can_reset = TRUE
|
||||
icon_state_unpowered = "laptop-open"
|
||||
icon = 'icons/obj/modular_laptop.dmi'
|
||||
icon_state = "laptop-open"
|
||||
@@ -37,4 +38,4 @@
|
||||
if(damage >= broken_damage)
|
||||
icon_state = icon_state_broken + "-closed"
|
||||
else
|
||||
icon_state = icon_state_closed
|
||||
icon_state = icon_state_closed
|
||||
@@ -5,6 +5,7 @@
|
||||
icon_state = "tablet"
|
||||
icon_state_unpowered = "tablet"
|
||||
icon_state_menu = "menu"
|
||||
can_reset = TRUE
|
||||
hardware_flag = PROGRAM_TABLET
|
||||
max_hardware_size = 1
|
||||
w_class = 2
|
||||
@@ -14,4 +15,4 @@
|
||||
. = ..()
|
||||
icon_state += pick("", "-blue", "-green", "-red", "-brown")
|
||||
icon_state_unpowered = icon_state
|
||||
icon_state_broken = icon_state
|
||||
icon_state_broken = icon_state
|
||||
@@ -174,3 +174,15 @@
|
||||
var/datum/computer_file/data/F = SSdocs.create_file(file)
|
||||
store_file(F)
|
||||
. = ..()
|
||||
|
||||
/obj/item/computer_hardware/hard_drive/proc/reset_drive()
|
||||
for(var/datum/computer_file/F in stored_files)
|
||||
remove_file(F)
|
||||
install_default_programs()
|
||||
|
||||
/obj/item/computer_hardware/hard_drive/attackby(obj/item/W, mob/living/user)
|
||||
if(istype(W, /obj/item/card/tech_support))
|
||||
reset_drive()
|
||||
to_chat(user, span("notice", "Drive successfully reset."))
|
||||
else
|
||||
..()
|
||||
@@ -263,31 +263,8 @@
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
|
||||
obj/machinery/lapvend/attackby(obj/item/W as obj, mob/user as mob)
|
||||
// Awaiting payment state
|
||||
if(state == 2)
|
||||
var/obj/item/card/id/I = W.GetID()
|
||||
if(process_payment(I,W))
|
||||
fabricate_and_recalc_price(1)
|
||||
if((devtype == 1) && fabricated_laptop)
|
||||
if(fabricated_laptop.battery_module)
|
||||
fabricated_laptop.battery_module.charge_to_full()
|
||||
fabricated_laptop.forceMove(src.loc)
|
||||
fabricated_laptop.screen_on = 0
|
||||
fabricated_laptop.anchored = 0
|
||||
fabricated_laptop.update_icon()
|
||||
fabricated_laptop = null
|
||||
else if((devtype == 2) && fabricated_tablet)
|
||||
if(fabricated_tablet.battery_module)
|
||||
fabricated_tablet.battery_module.charge_to_full()
|
||||
fabricated_tablet.forceMove(src.loc)
|
||||
fabricated_tablet = null
|
||||
ping("Enjoy your new product!")
|
||||
state = 3
|
||||
return 1
|
||||
return 0
|
||||
else if(W.iswrench())
|
||||
/obj/machinery/lapvend/attackby(obj/item/W, mob/user)
|
||||
if(W.iswrench())
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
if(anchored)
|
||||
@@ -297,11 +274,38 @@ obj/machinery/lapvend/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(do_after(user, 20/W.toolspeed))
|
||||
if(!src)
|
||||
return
|
||||
to_chat(user, span("notice","You [anchored? "un" : ""]secured \the [src]!"))
|
||||
to_chat(user, span("notice", "You [anchored ? "un" : ""]secured \the [src]!"))
|
||||
anchored = !anchored
|
||||
return
|
||||
else if(state == 2) // awaiting payment state
|
||||
if(istype(W, /obj/item/card/id))
|
||||
var/obj/item/card/id/I = W.GetID()
|
||||
if(process_payment(I, W))
|
||||
create_device()
|
||||
return TRUE
|
||||
else if(istype(W, /obj/item/card/tech_support))
|
||||
create_device("Have a Nanotrasen day!")
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/machinery/lapvend/proc/create_device(var/message = "Enjoy your new product!")
|
||||
fabricate_and_recalc_price(TRUE)
|
||||
if((devtype == 1) && fabricated_laptop)
|
||||
if(fabricated_laptop.battery_module)
|
||||
fabricated_laptop.battery_module.charge_to_full()
|
||||
fabricated_laptop.forceMove(src.loc)
|
||||
fabricated_laptop.screen_on = 0
|
||||
fabricated_laptop.anchored = 0
|
||||
fabricated_laptop.update_icon()
|
||||
fabricated_laptop = null
|
||||
else if((devtype == 2) && fabricated_tablet)
|
||||
if(fabricated_tablet.battery_module)
|
||||
fabricated_tablet.battery_module.charge_to_full()
|
||||
fabricated_tablet.forceMove(src.loc)
|
||||
fabricated_tablet = null
|
||||
ping(message)
|
||||
state = 3
|
||||
|
||||
// Simplified payment processing, returns 1 on success.
|
||||
/obj/machinery/lapvend/proc/process_payment(var/obj/item/card/id/I, var/obj/item/ID_container)
|
||||
var/obj/item/spacecash/S = null
|
||||
|
||||
7
html/changelogs/geeves-librarian_alts.yml
Normal file
7
html/changelogs/geeves-librarian_alts.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
author: Geeves
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- rscadd: "Added two librarian alt-titles. Tech Support, which handles.. IT stuff, such as resetting devices, and Curator, which handles display of artifacts, as well as pricing things with their price scanner."
|
||||
- rscadd: "Added the tech support card, which can reset devices to their original state, as well as vend devices from the laptop vendor for free."
|
||||
Reference in New Issue
Block a user