-Cleaned up the code to sacrifice borgs, AIs, and brains. (Also made it possible to sacrifice AIs on intelliCards)

-Gave brains a proper gib() so they are actually gone
-Added a proc to the 'Secrets' panel, a variation of power the station that instead is MUCH faster and just powers all SMES, turns on output, and sets it to max (helpful for testing and it doesn't leave the server frozen for 60 seconds to process)
-Added maxHealth to mice, killer tomatos, and walking mushrooms (They started with 5 health but could be 'healed' up to 20)
-Made the updatehealth() actually usable outside of humans by making it use maxHealth instead of just '100'
-Fix for shield generator sprites not updating properly, caused by not all generators actually updating on powerloss, and adding an update_icon() where needed
Fixes Issue 751

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4393 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
sieve32@gmail.com
2012-08-13 15:30:36 +00:00
parent e4e7256d66
commit 4b72ada290
9 changed files with 64 additions and 25 deletions

View File

@@ -162,6 +162,19 @@
A.power_environ = 1 A.power_environ = 1
A.power_change() A.power_change()
/proc/power_restore_quick()
command_alert("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal")
world << sound('poweron.ogg')
for(var/obj/machinery/power/smes/S in world)
if(S.z != 1)
continue
S.charge = S.capacity
S.output = 200000
S.online = 1
S.updateicon()
S.power_change()
/proc/appendicitis() /proc/appendicitis()
for(var/mob/living/carbon/human/H in living_mob_list) for(var/mob/living/carbon/human/H in living_mob_list)
var/foundAlready = 0 // don't infect someone that already has the virus var/foundAlready = 0 // don't infect someone that already has the virus

View File

@@ -538,15 +538,16 @@ var/list/sacrificed = list()
var/list/mob/living/carbon/human/cultsinrange = list() var/list/mob/living/carbon/human/cultsinrange = list()
var/list/mob/living/carbon/human/victims = list() var/list/mob/living/carbon/human/victims = list()
for(var/mob/living/carbon/human/V in src.loc)//Checks for non-cultist humans to sacrifice for(var/mob/living/carbon/human/V in src.loc)//Checks for non-cultist humans to sacrifice
if(!(iscultist(V))) if(ishuman(V) || isbrain(V) || issilicon(V))// || istype(V,/obj/item/device/mmi))
victims += V if(!(iscultist(V)))
for(var/mob/living/carbon/brain/V in src.loc)//Checks for brains to sacrifice victims += V//Checks for cult status and mob type
victims += V for(var/obj/item/I in src.loc)//Checks for MMIs/brains/Intellicards
for(var/mob/living/silicon/V in src.loc)//Checks for borgs/AIs to sacrifice if(istype(I,/obj/item/brain) || istype(I,/obj/item/device/mmi))
victims += V if(hasvar(I,"brainmob"))//Makes sure it has a brainmob
for(var/obj/item/device/mmi/V in src.loc)//Checks for MMIs victims += I:brainmob
if(V.brainmob) if(istype(I,/obj/item/device/aicard))
victims += V.brainmob for(var/mob/living/silicon/ai/A in I)//Because AIs are just stored inside the card and not attached to a var
victims += A
for(var/mob/living/carbon/C in orange(1,src)) for(var/mob/living/carbon/C in orange(1,src))
if(iscultist(C) && !C.stat) if(iscultist(C) && !C.stat)
cultsinrange += C cultsinrange += C
@@ -558,8 +559,6 @@ var/list/sacrificed = list()
sacrificed += H.mind sacrificed += H.mind
if(isrobot(H)) if(isrobot(H))
H.dust()//To prevent the MMI from remaining H.dust()//To prevent the MMI from remaining
else if(isbrain(H))
H.death()//Since they don't have a proper gib
else else
H.gib() H.gib()
usr << "\red The Geometer of Blood accepts this sacrifice, your objective is now complete." usr << "\red The Geometer of Blood accepts this sacrifice, your objective is now complete."
@@ -576,8 +575,6 @@ var/list/sacrificed = list()
usr << "\red However, this soul was not enough to gain His favor." usr << "\red However, this soul was not enough to gain His favor."
if(isrobot(H)) if(isrobot(H))
H.dust()//To prevent the MMI from remaining H.dust()//To prevent the MMI from remaining
else if(isbrain(H))
H.death()//Since they don't have a proper gib
else else
H.gib() H.gib()
else else
@@ -589,8 +586,6 @@ var/list/sacrificed = list()
usr << "\red However, a mere dead body is not enough to satisfy Him." usr << "\red However, a mere dead body is not enough to satisfy Him."
if(isrobot(H)) if(isrobot(H))
H.dust()//To prevent the MMI from remaining H.dust()//To prevent the MMI from remaining
else if(isbrain(H))
H.death()//Since they don't have a proper gib
else else
H.gib() H.gib()
else else
@@ -605,8 +600,6 @@ var/list/sacrificed = list()
usr << "\red However, a mere dead body is not enough to satisfy Him." usr << "\red However, a mere dead body is not enough to satisfy Him."
if(isrobot(H)) if(isrobot(H))
H.dust()//To prevent the MMI from remaining H.dust()//To prevent the MMI from remaining
else if(isbrain(H))
H.death()//Since they don't have a proper gib
else else
H.gib() H.gib()
else else
@@ -620,8 +613,6 @@ var/list/sacrificed = list()
usr << "\red However, this soul was not enough to gain His favor." usr << "\red However, this soul was not enough to gain His favor."
if(isrobot(H)) if(isrobot(H))
H.dust()//To prevent the MMI from remaining H.dust()//To prevent the MMI from remaining
else if(isbrain(H))
H.death()//Since they don't have a proper gib
else else
H.gib() H.gib()
else else
@@ -633,8 +624,6 @@ var/list/sacrificed = list()
usr << "\red However, a mere dead body is not enough to satisfy Him." usr << "\red However, a mere dead body is not enough to satisfy Him."
if(isrobot(H)) if(isrobot(H))
H.dust()//To prevent the MMI from remaining H.dust()//To prevent the MMI from remaining
else if(isbrain(H))
H.death()//Since they don't have a proper gib
else else
H.gib() H.gib()
else else
@@ -649,8 +638,6 @@ var/list/sacrificed = list()
usr << "\red However, a mere dead body is not enough to satisfy Him." usr << "\red However, a mere dead body is not enough to satisfy Him."
if(isrobot(H)) if(isrobot(H))
H.dust()//To prevent the MMI from remaining H.dust()//To prevent the MMI from remaining
else if(isbrain(H))
H.death()//Since they don't have a proper gib
else else
H.gib() H.gib()
for(var/mob/living/carbon/monkey/M in src.loc) for(var/mob/living/carbon/monkey/M in src.loc)

View File

@@ -1673,6 +1673,12 @@ var/global/BSACooldown = 0
log_admin("[key_name(usr)] made all areas unpowered", 1) log_admin("[key_name(usr)] made all areas unpowered", 1)
message_admins("\blue [key_name_admin(usr)] made all areas unpowered", 1) message_admins("\blue [key_name_admin(usr)] made all areas unpowered", 1)
power_failure() power_failure()
if("quickpower")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","QP")
log_admin("[key_name(usr)] made all SMESs powered", 1)
message_admins("\blue [key_name_admin(usr)] made all SMESs powered", 1)
power_restore_quick()
if("activateprison") if("activateprison")
feedback_inc("admin_secrets_fun_used",1) feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","AP") feedback_add_details("admin_secrets_fun_used","AP")
@@ -2460,6 +2466,7 @@ var/global/BSACooldown = 0
<A href='?src=\ref[src];secretsfun=sec_classic1'>Remove firesuits, grilles, and pods</A><BR> <A href='?src=\ref[src];secretsfun=sec_classic1'>Remove firesuits, grilles, and pods</A><BR>
<A href='?src=\ref[src];secretsfun=power'>Make all areas powered</A><BR> <A href='?src=\ref[src];secretsfun=power'>Make all areas powered</A><BR>
<A href='?src=\ref[src];secretsfun=unpower'>Make all areas unpowered</A><BR> <A href='?src=\ref[src];secretsfun=unpower'>Make all areas unpowered</A><BR>
<A href='?src=\ref[src];secretsfun=quickpower'>Power all SMES</A><BR>
<A href='?src=\ref[src];secretsfun=toggleprisonstatus'>Toggle Prison Shuttle Status(Use with S/R)</A><BR> <A href='?src=\ref[src];secretsfun=toggleprisonstatus'>Toggle Prison Shuttle Status(Use with S/R)</A><BR>
<A href='?src=\ref[src];secretsfun=activateprison'>Send Prison Shuttle</A><BR> <A href='?src=\ref[src];secretsfun=activateprison'>Send Prison Shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=deactivateprison'>Return Prison Shuttle</A><BR> <A href='?src=\ref[src];secretsfun=deactivateprison'>Return Prison Shuttle</A><BR>

View File

@@ -15,3 +15,29 @@
if(mind) mind.store_memory("Time of death: [tod]", 0) //mind. ? if(mind) mind.store_memory("Time of death: [tod]", 0) //mind. ?
return ..(gibbed) return ..(gibbed)
/mob/living/carbon/brain/gib()
death(1)
var/atom/movable/overlay/animation = null
monkeyizing = 1
canmove = 0
icon = null
invisibility = 101
animation = new(loc)
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
// flick("gibbed-m", animation)
gibs(loc, viruses, dna)
dead_mob_list -= src
if(container && istype(container, /obj/item/device/mmi))
del(container)//Gets rid of the MMI if there is one
if(loc)
if(istype(loc,/obj/item/brain))
del(loc)//Gets rid of the brain item
spawn(15)
if(animation) del(animation)
if(src) del(src)

View File

@@ -27,7 +27,7 @@
src.health = 100 src.health = 100
src.stat = 0 src.stat = 0
else else
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss() - src.halloss src.health = src.maxHealth - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss() - src.halloss
//This proc is used for mobs which are affected by pressure to calculate the amount of pressure that actually //This proc is used for mobs which are affected by pressure to calculate the amount of pressure that actually

View File

@@ -11,6 +11,7 @@
speak_chance = 1 speak_chance = 1
turns_per_move = 5 turns_per_move = 5
see_in_dark = 6 see_in_dark = 6
maxHealth = 5
health = 5 health = 5
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
response_help = "pets the" response_help = "pets the"

View File

@@ -6,6 +6,7 @@
icon_dead = "mushroom_dead" icon_dead = "mushroom_dead"
speak_chance = 0 speak_chance = 0
turns_per_move = 1 turns_per_move = 1
maxHealth = 5
health = 5 health = 5
meat_type = /obj/item/weapon/reagent_containers/food/snacks/hugemushroomslice meat_type = /obj/item/weapon/reagent_containers/food/snacks/hugemushroomslice
response_help = "pets the" response_help = "pets the"

View File

@@ -6,6 +6,7 @@
icon_dead = "tomato_dead" icon_dead = "tomato_dead"
speak_chance = 0 speak_chance = 0
turns_per_move = 5 turns_per_move = 5
maxHealth = 15
health = 15 health = 15
meat_type = /obj/item/weapon/reagent_containers/food/snacks/tomatomeat meat_type = /obj/item/weapon/reagent_containers/food/snacks/tomatomeat
response_help = "prods the" response_help = "prods the"

View File

@@ -332,9 +332,12 @@ field_generator power level display
if (isnull(FG)) if (isnull(FG))
continue continue
FG.connected_gens.Remove(src) FG.connected_gens.Remove(src)
if(!FG.clean_up)//Makes the other gens clean up as well
FG.cleanup()
connected_gens.Remove(FG) connected_gens.Remove(FG)
connected_gens = list() connected_gens = list()
clean_up = 0 clean_up = 0
update_icon()
//This is here to help fight the "hurr durr, release singulo cos nobody will notice before the //This is here to help fight the "hurr durr, release singulo cos nobody will notice before the
//singulo eats the evidence". It's not fool-proof but better than nothing. //singulo eats the evidence". It's not fool-proof but better than nothing.