Merge branch 'master' into upstream-merge-32093

This commit is contained in:
LetterJay
2017-10-29 02:27:52 -04:00
committed by GitHub
209 changed files with 2764 additions and 2305 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ obj/item/antag_spawner/syndi_borer/spawn_antag(client/C, turf/T, mob/owner)
to_chat(B, "<B>You are awake at last! Seek out whoever released you and aid them as best you can!</B>")
if(new_objective)
to_chat(B, "<B>Objective #[1]</B>: [new_objective.explanation_text]")
SSticker.mode.update_borer_icons_added(B)
/obj/item/antag_spawner/syndi_borer/proc/check_usability(mob/user)
if(used)
to_chat(user, "<span class='warning'>[src] appears to be empty!</span>")
@@ -75,7 +75,7 @@
var/datum/changelingprofile/prof = mind.changeling.add_new_profile(C, src)
mind.changeling.first_prof = prof
var/obj/item/organ/brain/B = C.getorganslot("brain")
var/obj/item/organ/brain/B = C.getorganslot(ORGAN_SLOT_BRAIN)
if(B)
B.vital = FALSE
B.decoy_override = TRUE
@@ -10,7 +10,7 @@
active = FALSE
/obj/effect/proc_holder/changeling/augmented_eyesight/on_purchase(mob/user) //The ability starts inactive, so we should be protected from flashes.
var/obj/item/organ/eyes/E = user.getorganslot("eye_sight")
var/obj/item/organ/eyes/E = user.getorganslot(ORGAN_SLOT_EYES)
if (E)
E.flash_protect = 2 //Adjust the user's eyes' flash protection
to_chat(user, "We adjust our eyes to protect them from bright lights.")
@@ -20,7 +20,7 @@
/obj/effect/proc_holder/changeling/augmented_eyesight/sting_action(mob/living/carbon/human/user)
if(!istype(user))
return
var/obj/item/organ/eyes/E = user.getorganslot("eye_sight")
var/obj/item/organ/eyes/E = user.getorganslot(ORGAN_SLOT_EYES)
if(E)
if(!active)
E.sight_flags |= SEE_MOBS | SEE_OBJS | SEE_TURFS //Add sight flags to the user's eyes
@@ -42,7 +42,7 @@
/obj/effect/proc_holder/changeling/augmented_eyesight/on_refund(mob/user) //Get rid of x-ray vision and flash protection when the user refunds this ability
var/obj/item/organ/eyes/E = user.getorganslot("eye_sight")
var/obj/item/organ/eyes/E = user.getorganslot(ORGAN_SLOT_EYES)
if(E)
if (active)
E.sight_flags ^= SEE_MOBS | SEE_OBJS | SEE_TURFS
@@ -27,7 +27,7 @@
C.emote("scream")
C.regenerate_limbs(1)
C.regenerate_organs()
if(!user.getorganslot("brain"))
if(!user.getorganslot(ORGAN_SLOT_BRAIN))
var/obj/item/organ/brain/changeling_brain/B = new()
B.Insert(C)
if(ishuman(user))
@@ -15,11 +15,14 @@
. = ..()
var/area/A = get_area(src)
if(A && construct_type)
notify_ghosts("A [construct_name] chassis has been created in [A.name]!", 'sound/magic/clockwork/fellowship_armory.ogg', source = src, action = NOTIFY_ORBIT, flashwindow = FALSE)
notify_ghosts("A [construct_name] chassis has been created in [A.name]!", 'sound/magic/clockwork/fellowship_armory.ogg', source = src, action = NOTIFY_ATTACK, flashwindow = FALSE)
GLOB.poi_list += src
LAZYADD(GLOB.mob_spawners[name], src)
/obj/item/clockwork/construct_chassis/Destroy()
GLOB.poi_list -= src
var/list/spawners = GLOB.mob_spawners[name]
LAZYREMOVE(spawners, src)
. = ..()
/obj/item/clockwork/construct_chassis/examine(mob/user)
@@ -37,6 +40,7 @@
if(!SSticker.mode)
to_chat(user, "<span class='danger'>You cannot use that before the game has started.</span>")
return
user.forceMove(get_turf(src)) //If we attack through the alert, jump to the chassis so we know what we're getting into
if(alert(user, "Become a [construct_name]? You can no longer be cloned!", construct_name, "Yes", "Cancel") == "Cancel")
return
if(QDELETED(src))
@@ -54,8 +54,14 @@
else
msg += "<b>[t_He] look[t_s] severely dented!</b>\n"
msg += "</span>"
var/addendum = examine_info()
if(addendum)
msg += "[addendum]\n"
msg += "*---------*</span>"
to_chat(user, msg)
/mob/living/simple_animal/hostile/clockwork/proc/examine_info() //Override this on a by-mob basis to have unique examine info
return
/mob/living/simple_animal/hostile/clockwork/proc/update_values() //This is called by certain things to check GLOB.ratvar_awakens and GLOB.ratvar_approaches
@@ -1,3 +1,6 @@
#define MARAUDER_SLOWDOWN_PERCENTAGE 0.40 //Below this percentage of health, marauders will become slower
#define MARAUDER_SHIELD_REGEN_TIME 100 //In deciseconds, how long it takes for shields to regenerate after breaking
//Clockwork marauder: A well-rounded frontline construct. Only one can exist for every two human servants.
/mob/living/simple_animal/hostile/clockwork/marauder
name = "clockwork marauder"
@@ -20,9 +23,26 @@
playstyle_string = "<b><span class='neovgre'>You are a clockwork marauder,</span> a well-rounded frontline construct of Ratvar. Although you have no \
unique abilities, you're a fearsome fighter in one-on-one combat, and your shield protects from projectiles!<br><br>Obey the Servants and do as they \
tell you. Your primary goal is to defend the Ark from destruction; they are your allies in this, and should be protected from harm.</b>"
empower_string = "<span class='neovgre'>The Anima Bulwark's power flows through you! Your weapon will strike harder, your armor is sturdier, and your shield is considerably more \
likely to deflect shots.</span>"
empower_string = "<span class='neovgre'>The Anima Bulwark's power flows through you! Your weapon will strike harder, your armor is sturdier, and your shield is more durable.</span>"
var/deflect_chance = 40 //Chance to deflect any given projectile (non-damaging energy projectiles are always deflected)
var/max_shield_health = 3
var/shield_health = 3 //Amount of projectiles that can be deflected within
var/shield_health_regen = 0 //When world.time equals this, shield health will regenerate
/mob/living/simple_animal/hostile/clockwork/marauder/examine_info()
if(!shield_health)
return "<span class='warning'>Its shield has been destroyed!</span>"
/mob/living/simple_animal/hostile/clockwork/marauder/Life()
..()
if(!GLOB.ratvar_awakens && health / maxHealth <= MARAUDER_SLOWDOWN_PERCENTAGE)
speed = initial(speed) + 1 //Yes, this slows them down
else
speed = initial(speed)
if(shield_health != max_shield_health && world.time >= shield_health_regen)
to_chat(src, "<span class='neovgre'>Your shield has recovered. <b>[max_shield_health]</b> blocks remaining!</span>")
playsound_local(src, "shatter", 75, TRUE, frequency = -1)
shield_health = max_shield_health
/mob/living/simple_animal/hostile/clockwork/marauder/update_values()
if(GLOB.ratvar_awakens) //Massive attack damage bonuses and health increase, because Ratvar
@@ -33,6 +53,7 @@
attacktext = "devastates"
speed = -1
obj_damage = 100
max_shield_health = INFINITY
else if(GLOB.ratvar_approaches) //Hefty health bonus and slight attack damage increase
health = 200
maxHealth = 200
@@ -40,6 +61,7 @@
melee_damage_lower = 15
attacktext = "carves"
obj_damage = 50
max_shield_health = 4
/mob/living/simple_animal/hostile/clockwork/marauder/death(gibbed)
visible_message("<span class='danger'>[src]'s equipment clatters lifelessly to the ground as the red flames within dissipate.</span>", \
@@ -64,21 +86,21 @@
return ..()
/mob/living/simple_animal/hostile/clockwork/marauder/proc/deflect_projectile(obj/item/projectile/P)
var/final_deflection_chance = deflect_chance
if(!shield_health)
return
var/energy_projectile = istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam)
if(P.nodamage || P.damage_type == STAMINA)
final_deflection_chance = 100
else if(!energy_projectile) //Flat 40% chance against energy projectiles; ballistic projectiles are 40% - (damage of projectile)%, min. 10%
final_deflection_chance = max(10, deflect_chance - P.damage)
if(GLOB.ratvar_awakens)
final_deflection_chance = 100
else if(GLOB.ratvar_approaches)
final_deflection_chance = min(100, final_deflection_chance + 20) //20% bonus to deflection if the servants heralded Ratvar
if(prob(final_deflection_chance))
visible_message("<span class='danger'>[src] deflects [P] with their shield!</span>", \
"<span class='danger'>You block [P] with your shield!</span>")
if(energy_projectile)
playsound(src, 'sound/weapons/effects/searwall.ogg', 50, TRUE)
else
playsound(src, "ricochet", 50, TRUE)
. = TRUE
visible_message("<span class='danger'>[src] deflects [P] with their shield!</span>", \
"<span class='danger'>You block [P] with your shield! <i>Blocks left:</i> <b>[shield_health - 1]</b></span>")
if(energy_projectile)
playsound(src, 'sound/weapons/effects/searwall.ogg', 50, TRUE)
else
playsound(src, "ricochet", 50, TRUE)
shield_health--
if(!shield_health)
visible_message("<span class='warning'>[src]'s shield breaks from deflecting the attack!</span>", "<span class='boldwarning'>Your shield breaks! Give it some time to recover...</span>")
playsound(src, "shatter", 100, TRUE)
shield_health_regen = world.time + MARAUDER_SHIELD_REGEN_TIME
return TRUE
#undef MARAUDER_SLOWDOWN_PERCENTAGE
#undef MARAUDER_SHIELD_REGEN_TIME
@@ -236,7 +236,7 @@
if(A.outdoors || A.map_name == "Space" || !A.blob_allowed)
to_chat(invoker, "<span class='danger'>Stargazers can't be built off-station.</span>")
return
return TRUE
return ..()
//Integration Cog: Creates an integration cog that can be inserted into APCs to passively siphon power.
@@ -491,7 +491,7 @@ Congratulations! You are now trained for invasive xenobiology research!"}
/obj/item/restraints/handcuffs/energy
name = "hard-light energy field"
desc = "A hard-light field restraining the hands."
icon_state = "cuff_white" // Needs sprite
icon_state = "cuff" // Needs sprite
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
breakouttime = 450
@@ -415,7 +415,6 @@ GLOBAL_VAR_INIT(total_borer_hosts_needed, 10)
victim = C
forceMove(victim)
SSticker.mode.update_borer_icons_added_host(victim.mind)
RemoveBorerActions()
GrantInfestActions()
@@ -591,7 +590,6 @@ GLOBAL_VAR_INIT(total_borer_hosts_needed, 10)
var/mob/living/V = victim
V.verbs -= /mob/living/proc/borer_comm
talk_to_borer_action.Remove(victim)
SSticker.mode.update_borer_icons_removed_host(victim.mind)
victim = null
return
@@ -1099,27 +1097,3 @@ GLOBAL_VAR_INIT(total_borer_hosts_needed, 10)
/datum/action/innate/borer/jumpstart_host/Activate()
var/mob/living/simple_animal/borer/B = owner
B.jumpstart()
//HUD STUFF
/datum/game_mode/proc/update_borer_icons_added(datum/mind/borer_mind)
var/datum/atom_hud/antag/borerhud = GLOB.huds[ANTAG_HUD_BORER]
borerhud.join_hud(borer_mind.current)
set_antag_hud(borer_mind.current, "hudbrainworm")
/datum/game_mode/proc/update_borer_icons_removed(datum/mind/borer_mind)
var/datum/atom_hud/antag/borerhud = GLOB.huds[ANTAG_HUD_BORER]
borerhud.leave_hud(borer_mind.current)
set_antag_hud(borer_mind.current, null)
/datum/game_mode/proc/update_borer_icons_added_host(datum/mind/host_mind)
var/datum/atom_hud/antag/hosthud = GLOB.huds[ANTAG_HUD_BORER] //Invisible to self
hosthud.self_visible = FALSE
hosthud.join_hud(host_mind.current)
set_antag_hud(host_mind.current, "hudbrainworm")
/datum/game_mode/proc/update_borer_icons_removed_host(datum/mind/host_mind)
var/datum/atom_hud/antag/hosthud = GLOB.huds[ANTAG_HUD_BORER] //Invisible to self
hosthud.self_visible = FALSE //Probably not needed as we're deleting?
hosthud.leave_hud(host_mind.current)
set_antag_hud(host_mind.current, null)