Maintenance Hatch Expansion and ID/Silicon Tweaks (#861)

tweak: "Spiderbots no longer block movement."
tweak: "Spiderbots can now use airlock maintenance hatches."
rscadd: "PAIs can now have the owner's ID card scanned onto them to share access."
tweak: "PAIs can now use airlock maintenance hatches, but only on airlocks they have access to. Requires a scanned ID"
tweak: "Added new rodent speech verbs for PAIs"
tweak: "Positronic brains and MMIs outside of a chassis can now use ping/beep/buzz audio emotes."
tweak: "You can now click an ID in your hand to imprint your biometric data on it, if it's not present. This is only useful if you lose the ID you spawn with and get a new one made up."
This commit is contained in:
NanakoAC
2016-09-13 15:49:13 +03:00
committed by skull132
parent b772cf0381
commit ddecbbe047
11 changed files with 167 additions and 35 deletions
@@ -10,6 +10,7 @@
var/looking_for_personality = 0
var/mob/living/silicon/pai/pai
/*/obj/item/device/paicard/relaymove(var/mob/user, var/direction)
if(src.loc && istype(src.loc.loc, /obj/item/rig_module))
var/obj/item/rig_module/module = src.loc.loc
@@ -27,6 +28,45 @@
pai.death(0)
..()
/obj/item/device/paicard/attackby(obj/item/C as obj, mob/user as mob)
if(istype(C, /obj/item/weapon/card/id))
scan_ID(C, user)
//This proc is called when the user scans their ID on the pAI card.
//It registers their ID and copies their access to the pai, allowing it to use airlocks the owner can
//Scanning an ID replaces any previously stored access with the new set.
//Only cards that match the imprinted DNA can be used, it's not a free Agent ID card.
//Possible TODO in future, allow emagging a paicard to let it work like an agent ID, accumulating access from any ID
/obj/item/device/paicard/proc/scan_ID(var/obj/item/weapon/card/id/card, var/mob/user)
if (!pai)
user << "<span class='warning'>Error: ID Registration failed. No pAI personality installed.</span>"
playsound(src.loc, 'sound/machines/buzz-two.ogg', 20, 0)
return 0
if (!pai.master_dna)
user << "<span class='warning'>Error: ID Registration failed. User not registered as owner. Please complete imprinting process first.</span>"
playsound(src.loc, 'sound/machines/buzz-two.ogg', 20, 0)
return 0
if (pai.master_dna != card.dna_hash)
user << "<span class='warning'>Error: ID Registration failed. Biometric data on ID card does not match DNA sample of registered owner.</span>"
playsound(src.loc, 'sound/machines/buzz-two.ogg', 20, 0)
return 0
pai.ID.access.Cut()
pai.ID.access = card.access.Copy()
pai.ID.registered_name = card.registered_name
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
user << "<span class='notice'>ID Registration for [pai.ID.registered_name] is a success. PAI access updated!</span>"
return 1
/obj/item/device/paicard/proc/ID_readout()
if (pai.ID.registered_name)
return "<span class='notice'>Identity of owner: [pai.ID.registered_name] registered.</span>"
else
return "<span class='warning'>No ID card registered! Please scan your ID to share access.</span>"
/obj/item/device/paicard/attack_self(mob/user)
if (!in_range(src, user))
return
@@ -143,6 +183,10 @@
<td class="request">Additional directives:</td>
<td>[pai.pai_laws]</td>
</tr>
<tr>
<td class="request">ID:</td>
<td>[ID_readout()]</td>
</tr>
</table>
<br>
"}