Merge pull request #495 from Sharkmare/patch-28

Minor modification of grub code
This commit is contained in:
Vollybally
2019-03-06 13:32:11 -05:00
committed by GitHub
2 changed files with 43 additions and 29 deletions
@@ -17,7 +17,11 @@ List of things solar grubs should be able to do:
icon_state = "solargrub"
icon_living = "solargrub"
icon_dead = "solargrub-dead"
var/charge = null //CHOMPEDIT The amount of power we sucked off, in K as in THOUSANDS.
var/can_evolve = 1 //CHOMPEDIT VAR to decide whether this subspecies is allowed to become a queen
var/adult_form = null //CHOMPEDIT VAR that decides what mob the queen form is. ex /mob/living/simple_animal/retaliate/solarmoth
faction = "grubs"
maxHealth = 50 //grubs can take a lot of harm
health = 50
@@ -54,6 +58,10 @@ List of things solar grubs should be able to do:
var/obj/structure/cable/attached // the attached cable
var/emp_chance = 20 // Beware synths
//VARS that were previously in LIFE but why tho, im porting all comments the original coder did too.
var/apc_drain_rate = 750 //Going to see if grubs are better as a minimal bother. previous value : 4000
var/powerdraw = 100000 // previous value 150000
/mob/living/simple_animal/retaliate/solargrub/PunchTarget()
if(target_mob&& prob(emp_chance))
target_mob.emp_act(4) //The weakest strength of EMP
@@ -77,8 +85,8 @@ List of things solar grubs should be able to do:
sparks.start()
anchored = 1
PN = attached.powernet
PN.draw_power(100000) // previous value 150000
var/apc_drain_rate = 750 //Going to see if grubs are better as a minimal bother. previous value : 4000
PN.draw_power(powerdraw)
charge = charge + powerdraw/1000 //This adds raw powerdraw to charge(Charge is in Ks as in 1 = 1000)
for(var/obj/machinery/power/terminal/T in PN.nodes)
if(istype(T.master, /obj/machinery/power/apc))
var/obj/machinery/power/apc/A = T.master