mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-26 18:13:11 +00:00
A lot of new defines are now in inventory_sizes.dm, which contains; All the size identifiers (the thing that tells the game if something is bulky, or w/e). Storage costs for all the sizes, which are exponents of two, as previously. A few constants for inventory size. Also changes all storage item's capacity definitions by basing it off of how many 'normal slots' exist for it. This allows one to change the definition for all of the defines in the file, and everything will follow along without needing to change 500 files. In testing, I made all ITEMSIZE_COST_* defines doubled, and nothing had broke. The benefit of doing all of this is that it makes adding new weight classes in the future much simpler, and makes knowing how much space a container has easier, as seeing ITEMSIZE_COST_NORMAL * 7 means it can hold seven normal items.
47 lines
1.6 KiB
Plaintext
47 lines
1.6 KiB
Plaintext
/**
|
|
* Multitool -- A multitool is used for hacking electronic devices.
|
|
* TO-DO -- Using it as a power measurement tool for cables etc. Nannek.
|
|
*
|
|
*/
|
|
|
|
/obj/item/device/debugger
|
|
name = "debugger"
|
|
desc = "Used to debug electronic equipment."
|
|
icon = 'icons/obj/hacktool.dmi'
|
|
icon_state = "hacktool-g"
|
|
flags = CONDUCT
|
|
force = 5.0
|
|
w_class = ITEMSIZE_SMALL
|
|
throwforce = 5.0
|
|
throw_range = 15
|
|
throw_speed = 3
|
|
desc = "You can use this on airlocks or APCs to try to hack them without cutting wires."
|
|
|
|
matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 20)
|
|
|
|
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1)
|
|
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
|
|
|
|
/obj/item/device/debugger/is_used_on(obj/O, mob/user)
|
|
if(istype(O, /obj/machinery/power/apc))
|
|
var/obj/machinery/power/apc/A = O
|
|
if(A.emagged || A.hacker)
|
|
user << "<span class='warning'>There is a software error with the device.</span>"
|
|
else
|
|
user << "<span class='notice'>The device's software appears to be fine.</span>"
|
|
return 1
|
|
if(istype(O, /obj/machinery/door))
|
|
var/obj/machinery/door/D = O
|
|
if(D.operating == -1)
|
|
user << "<span class='warning'>There is a software error with the device.</span>"
|
|
else
|
|
user << "<span class='notice'>The device's software appears to be fine.</span>"
|
|
return 1
|
|
else if(istype(O, /obj/machinery))
|
|
var/obj/machinery/A = O
|
|
if(A.emagged)
|
|
user << "<span class='warning'>There is a software error with the device.</span>"
|
|
else
|
|
user << "<span class='notice'>The device's software appears to be fine.</span>"
|
|
return 1
|