Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d928ddd
lockbox stuffs
SECBATON-GRIFFON Oct 31, 2024
c0b4c6a
adds these in
SECBATON-GRIFFON Oct 31, 2024
867d0e6
stack and autolathe stuff
SECBATON-GRIFFON Oct 31, 2024
eb2085f
actually this makes no sense sorry
SECBATON-GRIFFON Oct 31, 2024
46be07e
finally renames this
SECBATON-GRIFFON Oct 31, 2024
c0875af
adds this, maybe?
SECBATON-GRIFFON Oct 31, 2024
d71302c
Merge branch 'Bleeding-Edge' into more-lock-electronics
SECBATON-GRIFFON Oct 31, 2024
0754d78
update icon consistency
SECBATON-GRIFFON Oct 31, 2024
5775874
fixes
SECBATON-GRIFFON Oct 31, 2024
1eb7813
removes redundant definition, brings vars over and updates descriptio…
SECBATON-GRIFFON Oct 31, 2024
975a342
correct order
SECBATON-GRIFFON Apr 18, 2025
483b6c6
covers the vials too
SECBATON-GRIFFON Apr 18, 2025
73ae0fc
so that it actually goes inside properly
SECBATON-GRIFFON Apr 18, 2025
b19e3aa
moves stuff to protolathe
SECBATON-GRIFFON Apr 18, 2025
ec24fc6
moves this here too, does some more starting mats
SECBATON-GRIFFON Apr 18, 2025
4c6e459
vial thing icon
SECBATON-GRIFFON Apr 18, 2025
6ad6b5b
something to stop this showing up in the list
SECBATON-GRIFFON Apr 18, 2025
504401f
more usage
SECBATON-GRIFFON Apr 18, 2025
b60b4af
more use of this
SECBATON-GRIFFON Apr 18, 2025
711b230
sanity
SECBATON-GRIFFON Apr 18, 2025
3f20b04
some lock consistency
SECBATON-GRIFFON Apr 18, 2025
2753a66
has to be rewritten to allow putting things in here
SECBATON-GRIFFON Apr 18, 2025
8b2d946
forgot this
SECBATON-GRIFFON Apr 18, 2025
a4505d0
can't forget this
SECBATON-GRIFFON Apr 24, 2025
897b454
unneeded checks
SECBATON-GRIFFON Apr 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/_onclick/hud/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@
return 1
if(master)
var/obj/item/I = usr.get_active_hand()
if(I)
master.attackby(I, usr, params)
if(I && master.can_quick_store(I))
master.quick_store(I, usr)
//usr.next_move = world.time+2
return 1

Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/autolathe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
new /obj/item/weapon/reagent_containers/food/drinks/mug(), \
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass(), \
new /obj/item/weapon/storage/toolbox(), \
new /obj/item/weapon/storage/lockbox/coinbox(), \
new /obj/item/weapon/reagent_containers/glass/jar(), \
),
"Assemblies"=list(
Expand Down
8 changes: 0 additions & 8 deletions code/game/machinery/constructable_frame.dm
Original file line number Diff line number Diff line change
Expand Up @@ -464,14 +464,6 @@ to destroy them and players will be able to make replacements.
icon_state = "door_electronics"
//origin_tech = Tc_PROGRAMMING + "=2"

/obj/item/weapon/circuitboard/airlock
name = "Circuit board (Airlock)"
desc = "A circuit board used to operate airlocks and their access controls."
board_type= OTHER
icon = 'icons/obj/doors/door_assembly.dmi'
icon_state = "door_electronics"
//origin_tech = Tc_PROGRAMMING + "=2"

/obj/item/weapon/circuitboard/rdserver
name = "Circuit Board (R&D Server)"
desc = "A circuit board used to run a R&D server."
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,7 @@ About the new airlock wires panel:
I.playtoolsound(loc, 100)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.")
// TODO: refactor the called proc
to_chat(user, "<span class='notice'>You removed the airlock electronics!</span>")
to_chat(user, "<span class='notice'>You removed the access electronics!</span>")
revert(user,null)
qdel(src)
return
Expand Down
5 changes: 4 additions & 1 deletion code/game/machinery/doors/airlock_electronics.dm
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31

/obj/item/weapon/circuitboard/airlock
name = "airlock electronics"
name = "\proper access electronics"
desc = "A circuit board used to operate access controls on various machinery."
board_type= OTHER
icon = 'icons/obj/doors/door_assembly.dmi'
icon_state = "door_electronics"
w_class = W_CLASS_SMALL //It should be tiny! -Agouri
starting_materials = list(MAT_IRON = 50, MAT_GLASS = 50)
w_type = RECYK_ELECTRONIC
melt_temperature = MELTPOINT_SILICON
//origin_tech = Tc_PROGRAMMING + "=2"

req_access = list(access_engine_minor)

Expand Down
4 changes: 3 additions & 1 deletion code/game/objects/items/stacks/stack_recipes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ var/list/datum/stack_recipe/metal_recipes = list (
new/datum/stack_recipe("cannonball", /obj/item/cannonball/iron, 20, time = 4 SECONDS, one_per_turf = 0, on_floor = 1),
new/datum/stack_recipe("frying pan", /obj/item/weapon/reagent_containers/pan, 10, time = 4 SECONDS, one_per_turf = 0, on_floor = 0),
new/datum/stack_recipe("lunch box", /obj/item/weapon/storage/lunchbox/metal, 1, time = 2 SECONDS, one_per_turf = 0, on_floor = 0),
new/datum/stack_recipe("coinbox", /obj/item/weapon/storage/lockbox/coinbox/allaccess, 1, time = 2 SECONDS, one_per_turf = 0, on_floor = 0),
new/datum/stack_recipe("lockless coinbox", /obj/item/weapon/storage/lockbox/coinbox/nolock, 1, time = 2 SECONDS, one_per_turf = 0, on_floor = 0),
null,
blacksmithing_recipes,
null,
Expand All @@ -436,6 +436,8 @@ var/list/datum/stack_recipe/plasteel_recipes = list (
new/datum/stack_recipe("Tank dispenser", /obj/structure/dispenser/empty, 2, time = 10, one_per_turf = 1 ),
new/datum/stack_recipe("Fireaxe cabinet", /obj/item/mounted/frame/fireaxe_cabinet_frame, 2, time = 50 ),
null,
new/datum/stack_recipe("lockless lockbox", /obj/item/weapon/storage/lockbox/nolock, 1, time = 2 SECONDS, one_per_turf = 0, on_floor = 0),
null,
new/datum/stack_recipe("Vault Door assembly", /obj/structure/door_assembly/door_assembly_vault, 8, time = 50, one_per_turf = 1, on_floor = 1),
new/datum/stack_recipe/dorf("dorf chair", /obj/structure/bed/chair, one_per_turf = 1, on_floor = 1, inherit_material = TRUE, gen_quality = TRUE),
null,
Expand Down
7 changes: 6 additions & 1 deletion code/game/objects/items/weapons/storage/fancy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,11 @@
max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
storage_slots = 6
req_one_access = list(access_virology) //Obj was inheriting from obj/storage/lockbox which requires armory access. This behavior is overridden here.
starting_materials = list(MAT_GLASS = 50, MAT_IRON = 200)

/obj/item/weapon/storage/lockbox/vials/nolock
startswithelectronics = FALSE
locked = FALSE

/obj/item/weapon/storage/lockbox/vials/New()
..()
Expand Down Expand Up @@ -598,7 +603,7 @@
overlays += vial_image
i++

if (!broken)
if (!broken && electronics)
overlays += image(icon, src, "led[locked]")
if(locked)
overlays += image(icon, src, "cover")
Expand Down
149 changes: 101 additions & 48 deletions code/game/objects/items/weapons/storage/lockbox.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/obj/item/weapon/storage/lockbox
name = "lockbox"
desc = "A locked box."
desc = "A box that accepts and uses locking mechanisms."
icon_state = "lockbox+l"
item_state = "syringe_kit"
w_class = W_CLASS_LARGE
Expand All @@ -10,14 +10,37 @@
req_one_access = list(access_armory)
var/locked = 1
var/broken = 0
var/startswithelectronics = TRUE
var/icon_locked = "lockbox+l"
var/icon_closed = "lockbox"
var/icon_broken = "lockbox+b"
var/tracked_access = "It doesn't look like it's ever been used."
var/obj/item/weapon/circuitboard/airlock/electronics = null
health = 50
starting_materials = list(MAT_PLASMA = 1000, MAT_IRON = 1875)

/obj/item/weapon/storage/lockbox/New()
. = ..()
if(startswithelectronics)
electronics = new(src)
if(req_access)
electronics.conf_access = req_access
else if(req_one_access)
electronics.conf_access = req_one_access
electronics.one_access = 1

/obj/item/weapon/storage/lockbox/Destroy()
QDEL_NULL(electronics)
. = ..()

/obj/item/weapon/storage/lockbox/nolock
req_one_access = null
startswithelectronics = FALSE
locked = FALSE
icon_state = "lockbox+b"

/obj/item/weapon/storage/lockbox/can_use()
return broken || !locked
return broken || !locked || !electronics

/obj/item/weapon/storage/lockbox/attack_robot(var/mob/user)
to_chat(user, "<span class='rose'>This box was not designed for use by non-organics.</span>")
Expand All @@ -29,10 +52,7 @@
locked = !locked
user.visible_message("<span class='notice'>The lockbox has been [locked ? null : "un"]locked by [user].</span>", "<span class='rose'>You [locked ? null : "un"]lock the box.</span>")
tracked_access = "The tracker reads: 'Last locked by [id_name || get_id_name(user)].'"
if(locked)
icon_state = icon_locked
else
icon_state = icon_closed
update_icon()
else
to_chat(user, "<span class='notice'>Access Denied.</span>")
return FALSE
Expand Down Expand Up @@ -66,33 +86,71 @@
qdel(src)

/obj/item/weapon/storage/lockbox/attackby(obj/item/weapon/W, mob/user)
if (isID(W))
var/obj/item/weapon/card/id/I = W
var/obj/item/weapon/card/id/I = W.GetID()
if (I)
if(!electronics)
to_chat(user, "<span class='warning'>There is nothing to unlock. Put an access electronics board in this to make it lockable.</span>")
return
if(broken)
to_chat(user, "<span class='rose'>It appears to be broken.</span>")
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
return
return toggle(user, I.registered_name)
if (isPDA(W))
var/obj/item/device/pda/P = W
var/obj/item/weapon/card/id/I = P.id
if (!I)
if(!electronics && istype(W,/obj/item/weapon/circuitboard/airlock))
if(W.icon_state == "door_electronics_smoked")
to_chat(user, "<span class='warning'>Repair \the [W] before putting it in!</span>")
else if(user.drop_item(W,src))
electronics = W
to_chat(user, "<span class='notice'>You add \the [electronics] to \the [src].</span>")
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(electronics.conf_access?.len)
if(electronics.one_access)
req_one_access = electronics.conf_access
else
req_access = electronics.conf_access
broken = 0
locked = 0
update_icon()
return
if(broken)
to_chat(user, "<span class='rose'>It appears to be broken.</span>")
else if(broken && issolder(W))
var/obj/item/tool/solder/S = W
if(S.remove_fuel(4,user))
S.playtoolsound(loc, 100)
if(do_after(user, src,4 SECONDS * S.work_speed))
S.playtoolsound(loc, 100)
broken = 0
locked = 0
to_chat(user, "<span class='notice'>You repair the electronics inside the locking mechanism!</span>")
update_icon()
return
else if(!locked)
if(W.is_screwdriver() && electronics)
to_chat(user, "<span class='notice'>You unsecure \the [electronics] from \the [src].</span>")
W.playtoolsound(loc, 50)
electronics.forceMove(loc)
user.put_in_hands(electronics)
req_access = list()
req_one_access = list()
if(broken)
electronics.icon_state = "door_electronics_smoked"
electronics = null
broken = 0
locked = 0
update_icon()
return
return toggle(user, I.registered_name)
if(!locked)
. = ..()
else
to_chat(user, "<span class='warning'>It's locked!</span>")

/obj/item/weapon/storage/lockbox/obj_shows_to(atom/A)
return A != electronics

/obj/item/weapon/storage/lockbox/emag_act(var/mob/user)
if (broken)
if (!electronics || broken)
return FALSE
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = src.icon_broken
update_icon()
user.visible_message("<span class='danger'>\The [src] has been broken by \the [user] with an electromagnetic card!</span>", "<span class='notice'>You break open \the [src].</span>", "<span class='notice'>You hear a faint click sound.</span>", range = 3)
return TRUE

Expand Down Expand Up @@ -166,7 +224,7 @@

/obj/item/weapon/storage/lockbox/update_icon()
..()
if (broken)
if (!electronics || broken)
icon_state = src.icon_broken
else if(locked)
icon_state = src.icon_locked
Expand Down Expand Up @@ -237,29 +295,12 @@

/obj/item/weapon/storage/lockbox/examine(mob/user)
..()
if(!electronics)
to_chat(user, "<span class='info'>It has no access electronics and cannot be locked.</span>")
else if(broken)
to_chat(user, "<span class='info'>The access locking is broken!</span>")
to_chat(user, "<span class='info'>[tracked_access]</span>")

/obj/item/weapon/storage/lockbox/unlockable/attackby(obj/O as obj, mob/user as mob)
if (istype(O, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/ID = O
if(src.broken)
to_chat(user, "<span class='rose'>It appears to be broken.</span>")
return
else
src.locked = !( src.locked )
if(src.locked)
src.icon_state = src.icon_locked
to_chat(user, "<span class='rose'>You lock the [src.name]!</span>")
tracked_access = "The tracker reads: 'Last locked by [ID.registered_name]'."
return
else
src.icon_state = src.icon_closed
to_chat(user, "<span class='rose'>You unlock the [src.name]!</span>")
tracked_access = "The tracker reads: 'Last unlocked by [ID.registered_name].'"
return
else
. = ..()

/obj/item/weapon/storage/lockbox/unlockable/peace
name = "semi-secure lockbox (pax implants)"
items_to_spawn = list(/obj/item/weapon/implantcase/peace = 5)
Expand All @@ -281,8 +322,10 @@
icon_closed = "coinbox"
icon_broken = "coinbox+b"

/obj/item/weapon/storage/lockbox/coinbox/allaccess
/obj/item/weapon/storage/lockbox/coinbox/nolock
req_one_access = null
startswithelectronics = FALSE
icon_state = "coinbox+b"

/obj/item/weapon/storage/lockbox/lawgiver
name = "lockbox (lawgiver)"
Expand Down Expand Up @@ -314,7 +357,7 @@
if(!Adjacent(usr) || usr.loc == src)
return

if(src.broken)
if(!src.electronics || src.broken)
return

if (ishuman(usr))
Expand Down Expand Up @@ -342,6 +385,7 @@
max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
storage_slots = 7
req_one_access = list()
starting_materials = list(MAT_GLASS = 50, MAT_IRON = 200)
var/icon_alt = ""

/obj/item/weapon/storage/lockbox/diskettebox/New()
Expand All @@ -352,16 +396,25 @@
icon_state = "map_diskbox_open"
locked = FALSE

/obj/item/weapon/storage/lockbox/diskettebox/nolock
startswithelectronics = FALSE
locked = FALSE

/obj/item/weapon/storage/lockbox/diskettebox/large
name = "large diskette box"
desc = "A bigger lockable box for storing data disks."
icon_state = "map_diskbox_large"
icon_alt = "_large"
storage_slots = 14
starting_materials = list(MAT_GLASS = 100, MAT_IRON = 400)

/obj/item/weapon/storage/lockbox/diskettebox/large/open
icon_state = "map_diskbox_large_open"
locked = FALSE

/obj/item/weapon/storage/lockbox/diskettebox/large/nolock
startswithelectronics = FALSE
locked = FALSE

//---------------------------------PRESETS---------------------------------

Expand Down Expand Up @@ -421,12 +474,12 @@
overlays.len = 0
icon_state = "diskbox[icon_alt]"
item_state = "diskbox"
if (!broken && !locked)
overlays += image('icons/obj/storage/datadisks.dmi',src,"cover[icon_alt]_open")
if (!broken && !locked && electronics)
overlays += image(icon,src,"cover[icon_alt]_open")

var/i = 0
for (var/obj/item/weapon/disk/disk in contents)
var/image/disk_image = image('icons/obj/storage/datadisks.dmi',src,disk.icon_state)
var/image/disk_image = image(icon,src,disk.icon_state)
if (icon_alt)
disk_image.pixel_x -= 3
if ((i % 2) != 0)
Expand All @@ -443,9 +496,9 @@
overlays += disk_image
i++

overlays += image('icons/obj/storage/datadisks.dmi',src,"overlay[icon_alt]")
overlays += image(icon,src,"overlay[icon_alt]")

if (!broken)
if (!broken && electronics)
overlays += image(icon, src, "led[locked]")
if(locked)
overlays += image(icon, src, "cover[icon_alt]")
Expand Down
Loading
Loading