Merge pull request #807 from Citadel-Station-13/upstream-merge-26631

[MIRROR] 2017 Cult Overhaul P1:  Cult Master and Datum Cult
This commit is contained in:
LetterJay
2017-05-16 17:13:30 -04:00
committed by GitHub
28 changed files with 834 additions and 200 deletions
+1 -1
View File
@@ -49,8 +49,8 @@
timeofdeath = world.time
tod = worldtime2text()
var/turf/T = get_turf(src)
var/area/A = get_area(T)
if(mind && mind.name && mind.active && (!(T.flags & NO_DEATHRATTLE)))
var/area/A = get_area(T)
var/rendered = "<span class='deadsay'><b>[mind.name]</b> has died at <b>[A.name]</b>.</span>"
deadchat_broadcast(rendered, follow_target = src, turf_target = T, message_type=DEADCHAT_DEATHRATTLE)
if(mind)
@@ -14,8 +14,8 @@
stop_automated_movement = 1
status_flags = CANPUSH
attack_sound = 'sound/weapons/punch1.ogg'
see_in_dark = 7
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
see_in_dark = 7
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
@@ -31,12 +31,20 @@
deathmessage = "collapses in a shattered heap."
var/list/construct_spells = list()
var/playstyle_string = "<b>You are a generic construct! Your job is to not exist, and you should probably adminhelp this.</b>"
var/master = null
var/seeking = FALSE
/mob/living/simple_animal/hostile/construct/Initialize()
. = ..()
. = ..()
for(var/spell in construct_spells)
AddSpell(new spell(null))
/mob/living/simple_animal/hostile/construct/Destroy()
for(var/X in actions)
var/datum/action/A = X
qdel(A)
..()
/mob/living/simple_animal/hostile/construct/Login()
..()
to_chat(src, playstyle_string)
@@ -84,11 +92,11 @@
/mob/living/simple_animal/hostile/construct/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
return 0
/mob/living/simple_animal/hostile/construct/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
. = ..()
if(updating_health)
update_health_hud()
/mob/living/simple_animal/hostile/construct/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
. = ..()
if(updating_health)
update_health_hud()
/////////////////Juggernaut///////////////
/mob/living/simple_animal/hostile/construct/armored
@@ -119,6 +127,38 @@
AIStatus = AI_ON
environment_smash = 1 //only token destruction, don't smash the cult wall NO STOP
///////////////////////Master-Tracker///////////////////////
/datum/action/innate/seek_master
name = "Seek your Master"
desc = "You and your master share a soul-link that informs you of their location"
background_icon_state = "bg_demon"
buttontooltipstyle = "cult"
button_icon_state = "cult_mark"
var/tracking = FALSE
var/mob/living/simple_animal/hostile/construct/the_construct
/datum/action/innate/seek_master/Grant(var/mob/living/C)
the_construct = C
..()
/datum/action/innate/seek_master/Activate()
if(!the_construct.master)
to_chat(the_construct, "<span class='cultitalic'>You have no master to seek!</span>")
the_construct.seeking = FALSE
return
if(tracking)
tracking = FALSE
the_construct.seeking = FALSE
to_chat(the_construct, "<span class='cultitalic'>You are no longer tracking your master.</span>")
return
else
tracking = TRUE
the_construct.seeking = TRUE
to_chat(the_construct, "<span class='cultitalic'>You are now tracking your master.</span>")
/mob/living/simple_animal/hostile/construct/armored/bullet_act(obj/item/projectile/P)
if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam))
var/reflectchance = 80 - round(P.damage/3)
@@ -273,22 +313,22 @@
/mob/living/simple_animal/hostile/construct/harvester/hostile //actually hostile, will move around, hit things
AIStatus = AI_ON
environment_smash = 1 //only token destruction, don't smash the cult wall NO STOP
/////////////////////////////ui stuff/////////////////////////////
/mob/living/simple_animal/hostile/construct/update_health_hud()
if(hud_used)
if(health >= maxHealth)
hud_used.healths.icon_state = "[icon_state]_health0"
else if(health > maxHealth*0.8)
hud_used.healths.icon_state = "[icon_state]_health2"
else if(health > maxHealth*0.6)
hud_used.healths.icon_state = "[icon_state]_health3"
else if(health > maxHealth*0.4)
hud_used.healths.icon_state = "[icon_state]_health4"
else if(health > maxHealth*0.2)
hud_used.healths.icon_state = "[icon_state]_health5"
else
/////////////////////////////ui stuff/////////////////////////////
/mob/living/simple_animal/hostile/construct/update_health_hud()
if(hud_used)
if(health >= maxHealth)
hud_used.healths.icon_state = "[icon_state]_health0"
else if(health > maxHealth*0.8)
hud_used.healths.icon_state = "[icon_state]_health2"
else if(health > maxHealth*0.6)
hud_used.healths.icon_state = "[icon_state]_health3"
else if(health > maxHealth*0.4)
hud_used.healths.icon_state = "[icon_state]_health4"
else if(health > maxHealth*0.2)
hud_used.healths.icon_state = "[icon_state]_health5"
else
hud_used.healths.icon_state = "[icon_state]_health6"
@@ -0,0 +1,40 @@
diff a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm (rejected hunks)
@@ -41,14 +41,11 @@
for(var/spell in construct_spells)
AddSpell(new spell(null))
-<<<<<<< HEAD
/mob/living/simple_animal/hostile/construct/Destroy()
for(var/X in actions)
var/datum/action/A = X
qdel(A)
..()
-=======
->>>>>>> a7603e4aba50d410795d5207e6d5e929b2401cb9
/mob/living/simple_animal/hostile/construct/Login()
..()
@@ -288,8 +285,6 @@
environment_smash = 1 //only token destruction, don't smash the cult wall NO STOP
-
-<<<<<<< HEAD
///////////////////////Master-Tracker///////////////////////
/datum/action/innate/seek_master
@@ -320,7 +315,7 @@
the_construct.seeking = TRUE
to_chat(the_construct, "<span class='cultitalic'>You are now tracking your master.</span>")
-=======
+
/////////////////////////////ui stuff/////////////////////////////
/mob/living/simple_animal/hostile/construct/update_health_hud()
@@ -337,4 +332,4 @@
hud_used.healths.icon_state = "[icon_state]_health5"
else
hud_used.healths.icon_state = "[icon_state]_health6"
->>>>>>> a7603e4aba50d410795d5207e6d5e929b2401cb9
+