mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-07-09 23:29:28 +01:00
Medical Expansion (#6465)
* Starts work on the Medical Expansion. * Further Work * Save Everything! * Large volume of things. * Log of Change * I'm an idiot. * Kidney assisted sprites. They didn't exist, for some reason. * Fixfix * Fixfix * Update encased.dm * Update glass.dm * Update Chemistry-Reagents.dm I am once more an idiot. * Split augs. * Fixfix
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
//self-recharging
|
||||
var/self_recharge = 0 //if set, the weapon will recharge itself
|
||||
var/use_external_power = 0 //if set, the weapon will look for an external power source to draw from, otherwise it recharges magically
|
||||
var/use_organic_power = 0 // If set, the weapon will draw from nutrition or blood.
|
||||
var/recharge_time = 4
|
||||
var/charge_tick = 0
|
||||
var/charge_delay = 75 //delay between firing and charging
|
||||
@@ -61,6 +62,27 @@
|
||||
if(!external || !external.use(rechargeamt)) //Take power from the borg...
|
||||
return 0
|
||||
|
||||
if(use_organic_power)
|
||||
var/mob/living/carbon/human/H
|
||||
if(ishuman(loc))
|
||||
H = loc
|
||||
|
||||
if(istype(loc, /obj/item/organ))
|
||||
var/obj/item/organ/O = loc
|
||||
if(O.owner)
|
||||
H = O.owner
|
||||
|
||||
if(istype(H))
|
||||
var/start_nutrition = H.nutrition
|
||||
var/end_nutrition = 0
|
||||
|
||||
H.nutrition -= rechargeamt / 10
|
||||
|
||||
end_nutrition = H.nutrition
|
||||
|
||||
if(start_nutrition - max(0, end_nutrition) < rechargeamt / 10)
|
||||
H.remove_blood((rechargeamt / 10) - (start_nutrition - max(0, end_nutrition)))
|
||||
|
||||
power_supply.give(rechargeamt) //... to recharge 1/5th the battery
|
||||
update_icon()
|
||||
else
|
||||
|
||||
@@ -24,6 +24,11 @@
|
||||
use_external_power = 1
|
||||
one_handed_penalty = 0 // Not sure if two-handing gets checked for mounted weapons, but better safe than sorry.
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/mounted/augment
|
||||
use_external_power = FALSE
|
||||
use_organic_power = TRUE
|
||||
canremove = FALSE
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/practice
|
||||
name = "practice laser carbine"
|
||||
desc = "A modified version of the HI G40E, this one fires less concentrated energy bolts designed for target practice."
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
self_recharge = 1
|
||||
use_external_power = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/taser/mounted/augment
|
||||
self_recharge = 1
|
||||
use_external_power = 0
|
||||
use_organic_power = TRUE
|
||||
canremove = FALSE
|
||||
|
||||
/obj/item/weapon/gun/energy/taser/mounted/cyborg
|
||||
name = "taser gun"
|
||||
charge_cost = 400
|
||||
|
||||
Reference in New Issue
Block a user