mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge pull request #8898 from PsiOmegaDelta/eject_cartridge
Adds a PDA cartridge ejection verb.
This commit is contained in:
@@ -617,16 +617,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
|||||||
ownrank = id.rank
|
ownrank = id.rank
|
||||||
name = "PDA-[owner] ([ownjob])"
|
name = "PDA-[owner] ([ownjob])"
|
||||||
if("Eject")//Ejects the cart, only done from hub.
|
if("Eject")//Ejects the cart, only done from hub.
|
||||||
if (!isnull(cartridge))
|
verb_remove_cartridge()
|
||||||
var/turf/T = loc
|
|
||||||
if(ismob(T))
|
|
||||||
T = T.loc
|
|
||||||
cartridge.loc = T
|
|
||||||
mode = 0
|
|
||||||
scanmode = 0
|
|
||||||
if (cartridge.radio)
|
|
||||||
cartridge.radio.hostpda = null
|
|
||||||
cartridge = null
|
|
||||||
|
|
||||||
//MENU FUNCTIONS===================================
|
//MENU FUNCTIONS===================================
|
||||||
|
|
||||||
@@ -1120,6 +1111,30 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
|||||||
else
|
else
|
||||||
usr << "<span class='notice'>You cannot do this while restrained.</span>"
|
usr << "<span class='notice'>You cannot do this while restrained.</span>"
|
||||||
|
|
||||||
|
/obj/item/device/pda/verb/verb_remove_cartridge()
|
||||||
|
set category = "Object"
|
||||||
|
set name = "Remove cartridge"
|
||||||
|
set src in usr
|
||||||
|
|
||||||
|
if(issilicon(usr))
|
||||||
|
return
|
||||||
|
|
||||||
|
if (can_use(usr) && !isnull(cartridge))
|
||||||
|
var/turf/T = get_turf(src)
|
||||||
|
cartridge.loc = T
|
||||||
|
if (ismob(loc))
|
||||||
|
var/mob/M = loc
|
||||||
|
M.put_in_hands(cartridge)
|
||||||
|
else
|
||||||
|
cartridge.loc = get_turf(src)
|
||||||
|
mode = 0
|
||||||
|
scanmode = 0
|
||||||
|
if (cartridge.radio)
|
||||||
|
cartridge.radio.hostpda = null
|
||||||
|
cartridge = null
|
||||||
|
usr << "<span class='notice'>You remove \the [cartridge] from the [name].</span>"
|
||||||
|
else
|
||||||
|
usr << "<span class='notice'>You cannot do this while restrained.</span>"
|
||||||
|
|
||||||
/obj/item/device/pda/proc/id_check(mob/user as mob, choice as num)//To check for IDs; 1 for in-pda use, 2 for out of pda use.
|
/obj/item/device/pda/proc/id_check(mob/user as mob, choice as num)//To check for IDs; 1 for in-pda use, 2 for out of pda use.
|
||||||
if(choice == 1)
|
if(choice == 1)
|
||||||
|
|||||||
5
html/changelogs/PsiOmegaDelta-PR-8898.yml
Normal file
5
html/changelogs/PsiOmegaDelta-PR-8898.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
author: PsiOmegaDelta
|
||||||
|
delete-after: True
|
||||||
|
|
||||||
|
changes:
|
||||||
|
- rscadd: "Makes it possible to eject PDA cartridges using a verb."
|
||||||
Reference in New Issue
Block a user