Merge pull request #3117 from VOREStation/aro-fbpcells

Adds a synth backup cell to synth survival box, plus goggles
This commit is contained in:
Aronai Sieyes
2018-02-24 14:43:48 -05:00
committed by GitHub
4 changed files with 46 additions and 2 deletions
@@ -63,7 +63,9 @@
/obj/item/weapon/storage/box/survival/synth
name = "synthetic supply box"
desc = "A survival box issued to synthetic crew members for use in emergency situations."
starts_with = list()
starts_with = list(
/obj/item/clothing/glasses/goggles //VOREStation Add - Goggles for the phoron atmosphere,
)
/obj/item/weapon/storage/box/survival/comp
name = "emergency supply box"
@@ -249,7 +249,8 @@
//Create the box
var/obj/item/weapon/storage/box/box = new boxtype(H)
if(!synth)
//If not synth, they get an air tank (if they breathe)
if(!synth && breath_type)
//Create a tank (if such a thing exists for this species)
var/tanktext = "/obj/item/weapon/tank/emergency/" + "[breath_type]"
var/obj/item/weapon/tank/emergency/tankpath //Will force someone to come look here if they ever alter this path.
@@ -264,6 +265,10 @@
if(tankpath)
new tankpath(box)
//If they are synth, they get a smol battery
else if(synth)
new /obj/item/device/fbp_backup_cell(box)
box.calibrate_size()
if(H.backbag == 1)
+37
View File
@@ -91,3 +91,40 @@
maxcharge = 10000
matter = null
self_recharge = TRUE
//Not actually a cell, but if people look for it, they'll probably look near other cells
/obj/item/device/fbp_backup_cell
name = "backup battery"
desc = "A small one-time-use chemical battery for synthetic crew when they are low on power in emergency situations."
icon = 'icons/obj/power.dmi'
icon_state = "fbp_cell"
w_class = ITEMSIZE_SMALL
var/amount = 100
var/used = FALSE
/obj/item/device/fbp_backup_cell/initialize()
overlays += image(icon,"[icon_state]1")
/obj/item/device/fbp_backup_cell/attack(mob/living/M as mob, mob/user as mob)
if(!used && ishuman(M))
var/mob/living/carbon/human/H = M
if(H.isSynthetic())
if(H.nutrition <= amount)
use(user,H)
else
to_chat(user,"<span class='warning'>The difference in potential is too great. [user == M ? "You have" : "[H] has"] too much charge to use such a small battery.</span>")
else if(M == user)
to_chat(user,"<span class='warning'>You lick the cell, and your tongue tingles slightly.</span>")
else
to_chat(user,"<span class='warning'>This cell is meant for use on humanoid synthetics only.</span>")
. = ..()
/obj/item/device/fbp_backup_cell/proc/use(var/mob/living/user, var/mob/living/target)
if(used)
return
used = TRUE
desc += " This one has already been used."
overlays.Cut()
target.nutrition += amount
user.custom_emote(message = "connects \the [src] to [user == target ? "their" : "[target]'s"] charging port, expending it.")
Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB