mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 00:53:23 +01:00
Boop
This commit is contained in:
@@ -48,4 +48,9 @@
|
||||
name = "maintenance drone"
|
||||
desc = "It's a small maintenance robot."
|
||||
icon_state = "drone"
|
||||
origin_tech = "magnets=3;engineering=5"
|
||||
origin_tech = "magnets=3;engineering=5"
|
||||
|
||||
/obj/item/weapon/holder/pai
|
||||
name = "pAI"
|
||||
desc = "It's a little robot."
|
||||
icon_state = "pai"
|
||||
@@ -8,6 +8,7 @@
|
||||
small = 1
|
||||
pass_flags = 1
|
||||
density = 0
|
||||
holder_type = /obj/item/weapon/holder/pai
|
||||
|
||||
var/network = "SS13"
|
||||
var/obj/machinery/camera/current = null
|
||||
@@ -461,7 +462,16 @@
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
src.client.eye = card
|
||||
|
||||
//This seems redundant but not including the forced loc setting messes the behavior up.
|
||||
// If we are being held, handle removing our holder from their inv.
|
||||
var/obj/item/weapon/holder/H = loc
|
||||
if(istype(H))
|
||||
var/mob/living/M = H.loc
|
||||
if(istype(M))
|
||||
M.drop_from_inventory(H)
|
||||
H.loc = get_turf(src)
|
||||
src.loc = get_turf(H)
|
||||
|
||||
// Move us into the card and move the card to the ground
|
||||
src.loc = card
|
||||
card.loc = get_turf(card)
|
||||
src.forceMove(card)
|
||||
@@ -519,4 +529,23 @@
|
||||
|
||||
// No binary for pAIs.
|
||||
/mob/living/silicon/pai/binarycheck()
|
||||
return 0
|
||||
return 0
|
||||
|
||||
// Handle being picked up.
|
||||
/mob/living/silicon/pai/get_scooped(var/mob/living/carbon/grabber)
|
||||
var/obj/item/weapon/holder/H = ..()
|
||||
if(!istype(H))
|
||||
return
|
||||
H.icon_state = "pai-[icon_state]"
|
||||
grabber.update_inv_l_hand()
|
||||
grabber.update_inv_r_hand()
|
||||
return H
|
||||
|
||||
/mob/living/silicon/pai/MouseDrop(atom/over_object)
|
||||
var/mob/living/carbon/H = over_object
|
||||
if(!istype(H) || !Adjacent(H)) return ..()
|
||||
if(H.a_intent == "help")
|
||||
get_scooped(H)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
@@ -547,3 +547,62 @@
|
||||
P.sradio.code = min(100, P.sradio.code)
|
||||
P.sradio.code = max(1, P.sradio.code)
|
||||
return 1
|
||||
|
||||
/datum/pai_software/host_scan
|
||||
name = "Host Bioscan"
|
||||
ram_cost = 5
|
||||
id = "bioscan"
|
||||
|
||||
|
||||
var/mob/living/silicon/pai/P = usr
|
||||
if(!istype(P)) return
|
||||
|
||||
var/mob/living/M = P.loc
|
||||
var/count = 0
|
||||
|
||||
// Find the carrier
|
||||
while(!istype(M, /mob/living))
|
||||
if(!M || !M.loc || count > 6)
|
||||
src << "You are not being carried by anyone!"
|
||||
return 0
|
||||
M = M.loc
|
||||
count++
|
||||
|
||||
on_ui_interact(mob/living/silicon/pai/user, datum/nanoui/ui=null, force_open=1)
|
||||
|
||||
var/data[0]
|
||||
|
||||
|
||||
if(istype(M, /mob/living)
|
||||
data["holder"] = M
|
||||
data["health"] = "[M.stat > 1 ? "dead" : "[M.health]% healthy"]"
|
||||
data["oxy"] = "[M.getOxyLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getOxyLoss()]</font>"
|
||||
data["tox"] = "[M.getToxLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getToxLoss()]</font>"
|
||||
data["burn"] = "[M.getFireLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getFireLoss()]</font>"
|
||||
data["temp"] = "[M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F"
|
||||
|
||||
if (M.viruses)
|
||||
data["infected"] = 1
|
||||
var/virus[0]
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
var/vdata[0]
|
||||
vdata["name"] = D.name || "unknown"
|
||||
vdata["type"] = D.spread || "unknown"
|
||||
vdata["stage"] = D.stage || "unknown"
|
||||
vdata["stageMax"] = D.max_stages || "unknown"
|
||||
vdata["cure"] = D.cure || "unknown"
|
||||
|
||||
virus[++virus.len]=vdata
|
||||
data["infectionDat"] = virus
|
||||
|
||||
|
||||
else
|
||||
data["holder"] = 0
|
||||
|
||||
ui = nanomanager.try_update_ui(user, user, id, ui,data , force_open)
|
||||
if(!ui)
|
||||
// Don't copy-paste this unless you're making a pAI software module!
|
||||
ui = new(user, user, id, "pai_bioscan.tmpl", "Host Bioscan", 450, 600)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
Reference in New Issue
Block a user