12/21 modernizations from TG live (#103)
* sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes
This commit is contained in:
+66
-21
@@ -61,19 +61,25 @@
|
||||
|
||||
//called when a carbon changes virus
|
||||
/mob/living/carbon/proc/check_virus()
|
||||
var/threat = 0
|
||||
for(var/datum/disease/D in viruses)
|
||||
if((!(D.visibility_flags & HIDDEN_SCANNER)) && (D.severity != NONTHREAT))
|
||||
return 1
|
||||
return 0
|
||||
if(!(D.visibility_flags & HIDDEN_SCANNER))
|
||||
if (D.severity != NONTHREAT) //a buffing virus gets an icon
|
||||
threat = 2
|
||||
return threat //harmful viruses have priority
|
||||
else
|
||||
threat = 1 //aka good virus
|
||||
|
||||
return threat
|
||||
|
||||
//helper for getting the appropriate health status
|
||||
/proc/RoundHealth(mob/living/M)
|
||||
if(M.stat == DEAD || (M.status_flags & FAKEDEATH))
|
||||
return "health-100" //what's our health? it doesn't matter, we're dead, or faking
|
||||
var/maxhealth = M.maxHealth
|
||||
var/maxi_health = M.maxHealth
|
||||
if(iscarbon(M) && M.health < 0)
|
||||
maxhealth = 100 //so crit shows up right for aliens and other high-health carbon mobs; noncarbons don't have crit.
|
||||
var/resulthealth = (M.health / maxhealth) * 100
|
||||
maxi_health = 100 //so crit shows up right for aliens and other high-health carbon mobs; noncarbons don't have crit.
|
||||
var/resulthealth = (M.health / maxi_health) * 100
|
||||
switch(resulthealth)
|
||||
if(100 to INFINITY)
|
||||
return "health100"
|
||||
@@ -131,6 +137,8 @@
|
||||
/mob/living/proc/med_hud_set_health()
|
||||
var/image/holder = hud_list[HEALTH_HUD]
|
||||
holder.icon_state = "hud[RoundHealth(src)]"
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
|
||||
//for carbon suit sensors
|
||||
/mob/living/carbon/med_hud_set_health()
|
||||
@@ -143,6 +151,8 @@
|
||||
//called when a carbon changes stat, virus or XENO_HOST
|
||||
/mob/living/proc/med_hud_set_status()
|
||||
var/image/holder = hud_list[STATUS_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
if(stat == DEAD || (status_flags & FAKEDEATH))
|
||||
holder.icon_state = "huddead"
|
||||
else
|
||||
@@ -150,12 +160,20 @@
|
||||
|
||||
/mob/living/carbon/med_hud_set_status()
|
||||
var/image/holder = hud_list[STATUS_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
var/virus_state = check_virus()
|
||||
var/mob/living/simple_animal/borer/B = has_brain_worms()
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
if(status_flags & XENO_HOST)
|
||||
holder.icon_state = "hudxeno"
|
||||
else if(stat == DEAD || (status_flags & FAKEDEATH))
|
||||
holder.icon_state = "huddead"
|
||||
else if(check_virus())
|
||||
else if(has_brain_worms() && B != null && B.controlling)
|
||||
holder.icon_state = "hudbrainworm"
|
||||
else if(virus_state == 2)
|
||||
holder.icon_state = "hudill"
|
||||
else if(virus_state == 1)
|
||||
holder.icon_state = "hudbuff"
|
||||
else
|
||||
holder.icon_state = "hudhealthy"
|
||||
|
||||
@@ -168,6 +186,8 @@
|
||||
|
||||
/mob/living/carbon/human/proc/sec_hud_set_ID()
|
||||
var/image/holder = hud_list[ID_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
holder.icon_state = "hudno_id"
|
||||
if(wear_id)
|
||||
holder.icon_state = "hud[ckey(wear_id.GetJobName())]"
|
||||
@@ -181,20 +201,27 @@
|
||||
for(var/i in list(IMPTRACK_HUD, IMPLOYAL_HUD, IMPCHEM_HUD))
|
||||
holder = hud_list[i]
|
||||
holder.icon_state = null
|
||||
for(var/obj/item/weapon/implant/I in src)
|
||||
if(I.implanted)
|
||||
if(istype(I,/obj/item/weapon/implant/tracking))
|
||||
holder = hud_list[IMPTRACK_HUD]
|
||||
holder.icon_state = "hud_imp_tracking"
|
||||
else if(istype(I,/obj/item/weapon/implant/mindshield))
|
||||
holder = hud_list[IMPLOYAL_HUD]
|
||||
holder.icon_state = "hud_imp_loyal"
|
||||
else if(istype(I,/obj/item/weapon/implant/chem))
|
||||
holder = hud_list[IMPCHEM_HUD]
|
||||
holder.icon_state = "hud_imp_chem"
|
||||
for(var/obj/item/weapon/implant/I in implants)
|
||||
if(istype(I,/obj/item/weapon/implant/tracking))
|
||||
holder = hud_list[IMPTRACK_HUD]
|
||||
var/icon/IC = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = IC.Height() - world.icon_size
|
||||
holder.icon_state = "hud_imp_tracking"
|
||||
else if(istype(I,/obj/item/weapon/implant/mindshield))
|
||||
holder = hud_list[IMPLOYAL_HUD]
|
||||
var/icon/IC = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = IC.Height() - world.icon_size
|
||||
holder.icon_state = "hud_imp_loyal"
|
||||
else if(istype(I,/obj/item/weapon/implant/chem))
|
||||
holder = hud_list[IMPCHEM_HUD]
|
||||
var/icon/IC = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = IC.Height() - world.icon_size
|
||||
holder.icon_state = "hud_imp_chem"
|
||||
|
||||
/mob/living/carbon/human/proc/sec_hud_set_security_status()
|
||||
var/image/holder = hud_list[WANTED_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
var/perpname = get_face_name(get_id_name(""))
|
||||
if(perpname)
|
||||
var/datum/data/record/R = find_record("name", perpname, data_core.security)
|
||||
@@ -240,6 +267,8 @@
|
||||
//Sillycone hooks
|
||||
/mob/living/silicon/proc/diag_hud_set_health()
|
||||
var/image/holder = hud_list[DIAG_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
if(stat == DEAD)
|
||||
holder.icon_state = "huddiagdead"
|
||||
else
|
||||
@@ -247,6 +276,8 @@
|
||||
|
||||
/mob/living/silicon/proc/diag_hud_set_status()
|
||||
var/image/holder = hud_list[DIAG_STAT_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
switch(stat)
|
||||
if(CONSCIOUS)
|
||||
holder.icon_state = "hudstat"
|
||||
@@ -258,7 +289,9 @@
|
||||
//Borgie battery tracking!
|
||||
/mob/living/silicon/robot/proc/diag_hud_set_borgcell()
|
||||
var/image/holder = hud_list[DIAG_BATT_HUD]
|
||||
if (cell)
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
if(cell)
|
||||
var/chargelvl = (cell.charge/cell.maxcharge)
|
||||
holder.icon_state = "hudbatt[RoundDiagBar(chargelvl)]"
|
||||
else
|
||||
@@ -269,12 +302,16 @@
|
||||
~~~~~~~~~~~~~~~~~~~~~*/
|
||||
/obj/mecha/proc/diag_hud_set_mechhealth()
|
||||
var/image/holder = hud_list[DIAG_MECH_HUD]
|
||||
holder.icon_state = "huddiag[RoundDiagBar(health/initial(health))]"
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
holder.icon_state = "huddiag[RoundDiagBar(obj_integrity/max_integrity)]"
|
||||
|
||||
|
||||
/obj/mecha/proc/diag_hud_set_mechcell()
|
||||
var/image/holder = hud_list[DIAG_BATT_HUD]
|
||||
if (cell)
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
if(cell)
|
||||
var/chargelvl = cell.charge/cell.maxcharge
|
||||
holder.icon_state = "hudbatt[RoundDiagBar(chargelvl)]"
|
||||
else
|
||||
@@ -283,6 +320,8 @@
|
||||
|
||||
/obj/mecha/proc/diag_hud_set_mechstat()
|
||||
var/image/holder = hud_list[DIAG_STAT_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
holder.icon_state = null
|
||||
if(internal_damage)
|
||||
holder.icon_state = "hudwarn"
|
||||
@@ -292,10 +331,14 @@
|
||||
~~~~~~~~~~*/
|
||||
/mob/living/simple_animal/bot/proc/diag_hud_set_bothealth()
|
||||
var/image/holder = hud_list[DIAG_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
holder.icon_state = "huddiag[RoundDiagBar(health/maxHealth)]"
|
||||
|
||||
/mob/living/simple_animal/bot/proc/diag_hud_set_botstat() //On (With wireless on or off), Off, EMP'ed
|
||||
var/image/holder = hud_list[DIAG_STAT_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
if(on)
|
||||
holder.icon_state = "hudstat"
|
||||
else if(stat) //Generally EMP causes this
|
||||
@@ -305,6 +348,8 @@
|
||||
|
||||
/mob/living/simple_animal/bot/proc/diag_hud_set_botmode() //Shows a bot's current operation
|
||||
var/image/holder = hud_list[DIAG_BOT_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
if(client) //If the bot is player controlled, it will not be following mode logic!
|
||||
holder.icon_state = "hudsentient"
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user