mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 05:27:01 +01:00
New PDA painter item
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
/obj/machinery/pdapainter
|
||||
name = "PDA painter"
|
||||
desc = "A PDA painting machine. To use, simply insert your PDA and choose the desired preset paint scheme."
|
||||
icon = 'icons/obj/pda.dmi'
|
||||
icon_state = "pdapainter"
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/obj/item/device/pda/storedpda = null
|
||||
var/list/colorlist = list()
|
||||
|
||||
|
||||
/obj/machinery/pdapainter/update_icon()
|
||||
overlays.Cut()
|
||||
|
||||
if(stat & BROKEN)
|
||||
icon_state = "[initial(icon_state)]-broken"
|
||||
return
|
||||
|
||||
if(storedpda)
|
||||
overlays += "[initial(icon_state)]-closed"
|
||||
|
||||
if(powered())
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]-off"
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/pdapainter/New()
|
||||
..()
|
||||
var/blocked = list(/obj/item/device/pda/ai/pai, /obj/item/device/pda/ai, /obj/item/device/pda/heads,
|
||||
/obj/item/device/pda/clear, /obj/item/device/pda/syndicate)
|
||||
|
||||
for(var/P in typesof(/obj/item/device/pda)-blocked)
|
||||
var/obj/item/device/pda/D = new P
|
||||
|
||||
//D.name = "PDA Style [colorlist.len+1]" //Gotta set the name, otherwise it all comes up as "PDA"
|
||||
D.name = D.icon_state //PDAs don't have unique names, but using the sprite names works.
|
||||
|
||||
src.colorlist += D
|
||||
|
||||
|
||||
/obj/machinery/pdapainter/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(istype(O, /obj/item/device/pda))
|
||||
if(storedpda)
|
||||
user << "There is already a PDA inside."
|
||||
return
|
||||
else
|
||||
var/obj/item/device/pda/P = usr.get_active_hand()
|
||||
if(istype(P))
|
||||
user.drop_item()
|
||||
storedpda = P
|
||||
P.loc = src
|
||||
P.add_fingerprint(usr)
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/machinery/pdapainter/attack_hand(mob/user as mob)
|
||||
..()
|
||||
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if(storedpda)
|
||||
var/obj/item/device/pda/P
|
||||
P = input(user, "Select your color!", "PDA Painting") as null|anything in colorlist
|
||||
if(!P)
|
||||
return
|
||||
if(!in_range(src, user))
|
||||
return
|
||||
|
||||
storedpda.icon_state = P.icon_state
|
||||
storedpda.desc = P.desc
|
||||
|
||||
else
|
||||
user << "<span class='notice'>The [src] is empty.</span>"
|
||||
|
||||
|
||||
/obj/machinery/pdapainter/verb/ejectpda()
|
||||
set name = "Eject PDA"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(storedpda)
|
||||
storedpda.loc = get_turf(src.loc)
|
||||
storedpda = null
|
||||
update_icon()
|
||||
else
|
||||
usr << "<span class='notice'>The [src] is empty.</span>"
|
||||
|
||||
|
||||
/obj/machinery/pdapainter/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
@@ -46,23 +46,23 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/medical
|
||||
default_cartridge = /obj/item/weapon/cartridge/medical
|
||||
icon_state = "pda-m"
|
||||
icon_state = "pda-medical"
|
||||
|
||||
/obj/item/device/pda/viro
|
||||
default_cartridge = /obj/item/weapon/cartridge/medical
|
||||
icon_state = "pda-v"
|
||||
icon_state = "pda-virology"
|
||||
|
||||
/obj/item/device/pda/engineering
|
||||
default_cartridge = /obj/item/weapon/cartridge/engineering
|
||||
icon_state = "pda-e"
|
||||
icon_state = "pda-engineer"
|
||||
|
||||
/obj/item/device/pda/security
|
||||
default_cartridge = /obj/item/weapon/cartridge/security
|
||||
icon_state = "pda-s"
|
||||
icon_state = "pda-security"
|
||||
|
||||
/obj/item/device/pda/detective
|
||||
default_cartridge = /obj/item/weapon/cartridge/detective
|
||||
icon_state = "pda-det"
|
||||
icon_state = "pda-detective"
|
||||
|
||||
/obj/item/device/pda/warden
|
||||
default_cartridge = /obj/item/weapon/cartridge/security
|
||||
@@ -70,12 +70,12 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/janitor
|
||||
default_cartridge = /obj/item/weapon/cartridge/janitor
|
||||
icon_state = "pda-j"
|
||||
icon_state = "pda-janitor"
|
||||
ttone = "slip"
|
||||
|
||||
/obj/item/device/pda/toxins
|
||||
default_cartridge = /obj/item/weapon/cartridge/signal/toxins
|
||||
icon_state = "pda-tox"
|
||||
icon_state = "pda-science"
|
||||
ttone = "boom"
|
||||
|
||||
/obj/item/device/pda/clown
|
||||
@@ -92,7 +92,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/heads
|
||||
default_cartridge = /obj/item/weapon/cartridge/head
|
||||
icon_state = "pda-h"
|
||||
icon_state = "pda-hop"
|
||||
|
||||
/obj/item/device/pda/heads/hop
|
||||
default_cartridge = /obj/item/weapon/cartridge/hop
|
||||
@@ -116,7 +116,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/captain
|
||||
default_cartridge = /obj/item/weapon/cartridge/captain
|
||||
icon_state = "pda-c"
|
||||
icon_state = "pda-captain"
|
||||
detonate = 0
|
||||
//toff = 1
|
||||
|
||||
@@ -126,20 +126,20 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/quartermaster
|
||||
default_cartridge = /obj/item/weapon/cartridge/quartermaster
|
||||
icon_state = "pda-q"
|
||||
icon_state = "pda-qm"
|
||||
|
||||
/obj/item/device/pda/shaftminer
|
||||
icon_state = "pda-miner"
|
||||
|
||||
/obj/item/device/pda/syndicate
|
||||
default_cartridge = /obj/item/weapon/cartridge/syndicate
|
||||
icon_state = "pda-syn"
|
||||
icon_state = "pda-syndi"
|
||||
name = "Military PDA"
|
||||
owner = "John Doe"
|
||||
hidden = 1
|
||||
|
||||
/obj/item/device/pda/chaplain
|
||||
icon_state = "pda-holy"
|
||||
icon_state = "pda-chaplain"
|
||||
ttone = "holy"
|
||||
|
||||
/obj/item/device/pda/lawyer
|
||||
@@ -152,16 +152,16 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
icon_state = "pda-hydro"
|
||||
|
||||
/obj/item/device/pda/roboticist
|
||||
icon_state = "pda-robot"
|
||||
icon_state = "pda-roboticist"
|
||||
|
||||
/obj/item/device/pda/librarian
|
||||
icon_state = "pda-libb"
|
||||
icon_state = "pda-library"
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a WGW-11 series e-reader."
|
||||
note = "Congratulations, your station has chosen the Thinktronic 5290 WGW-11 Series E-reader and Personal Data Assistant!"
|
||||
silent = 1 //Quiet in the library!
|
||||
|
||||
/obj/item/device/pda/clear
|
||||
icon_state = "pda-transp"
|
||||
icon_state = "pda-clear"
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a special edition with a transparent case."
|
||||
note = "Congratulations, you have chosen the Thinktronic 5230 Personal Data Assistant Deluxe Special Max Turbo Limited Edition!"
|
||||
|
||||
@@ -169,19 +169,19 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
icon_state = "pda-chef"
|
||||
|
||||
/obj/item/device/pda/bar
|
||||
icon_state = "pda-bar"
|
||||
icon_state = "pda-bartender"
|
||||
|
||||
/obj/item/device/pda/atmos
|
||||
default_cartridge = /obj/item/weapon/cartridge/atmos
|
||||
icon_state = "pda-atmo"
|
||||
icon_state = "pda-atmos"
|
||||
|
||||
/obj/item/device/pda/chemist
|
||||
default_cartridge = /obj/item/weapon/cartridge/chemistry
|
||||
icon_state = "pda-chem"
|
||||
icon_state = "pda-chemistry"
|
||||
|
||||
/obj/item/device/pda/geneticist
|
||||
default_cartridge = /obj/item/weapon/cartridge/medical
|
||||
icon_state = "pda-gene"
|
||||
icon_state = "pda-genetics"
|
||||
|
||||
|
||||
// Special AI/pAI PDAs that cannot explode.
|
||||
@@ -1170,7 +1170,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
/obj/item/weapon/storage/box/PDAs
|
||||
name = "spare PDAs"
|
||||
desc = "A box of spare PDA microcomputers."
|
||||
icon = 'icons/obj/pda.dmi'
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "pdabox"
|
||||
|
||||
New()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/item/device/aicard
|
||||
name = "inteliCard"
|
||||
icon = 'icons/obj/pda.dmi'
|
||||
icon = 'icons/obj/aicards.dmi'
|
||||
icon_state = "aicard" // aicard-full
|
||||
item_state = "electronic"
|
||||
w_class = 2.0
|
||||
@@ -115,9 +115,9 @@
|
||||
A.control_disabled = !A.control_disabled
|
||||
A << "The intelicard's wireless port has been [A.control_disabled ? "disabled" : "enabled"]!"
|
||||
if (A.control_disabled)
|
||||
overlays -= image('icons/obj/pda.dmi', "aicard-on")
|
||||
overlays -= image('icons/obj/aicards.dmi', "aicard-on")
|
||||
else
|
||||
overlays += image('icons/obj/pda.dmi', "aicard-on")
|
||||
overlays += image('icons/obj/aicards.dmi', "aicard-on")
|
||||
attack_self(U)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/item/device/paicard
|
||||
name = "personal AI device"
|
||||
icon = 'icons/obj/pda.dmi'
|
||||
icon = 'icons/obj/aicards.dmi'
|
||||
icon_state = "pai"
|
||||
item_state = "electronic"
|
||||
w_class = 2.0
|
||||
|
||||
Reference in New Issue
Block a user