mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-28 23:51:17 +01:00
Four major fixes. These are all pretty clearly bugs, but the result is a substantial mech nerf (except EMPs against EM armor.) First, EMP armour. EMP armour did nothing, it was partially ported to use TG's Element flag system, this finishes that. Rather than make the EMP armour immune to EMP, it spends power to negate it. The cost is 1000 / severity. Heavy EMP is 1, Light EMP is 2. This is 5% of a basic mech cell for light, 10% for heavy. Also fixes the pilot getting EMP'd twice for every EMP act on the mech. Second, open hatches let attacks hit the pilot. Chance is 80% from the front, 20% from the sides. The chance is mostly so that turrets that always aim torso don't shoot mechs forever, always hitting the pilot inside. Third, cockpit damage actually matters now. Previously shooting the mech in the chest was nearly worthless, no important components were there and destroying it did not destroy the mech. Now if the cockpit is completely destroyed, attacks against it penetrate through to hit the pilot. These attacks still account for the mech's armour. Combined with the hatch getting stuck closed, you can have tense rescues of pilots bleeding out inside their suits. Fourth, the mech running out of power actually stops it doing things. Uranium and Phoron power cores allowed mechs to keep running forever, even at fractional power, because they recharged slightly every tick. Now if the mech ever cannot afford the power cost of an action it shuts down. It can be powered back up immediately if the power core recharges it, but it cannot now do costly actions at single digit power. I fixed mech combat shields. They suck, they use the auras system which does not play nicely with the new projectile code. Recursive calls and spaghetti mess. Works for now but could use a complete rewrite. --------- Signed-off-by: FenodyreeAv <fenodyree.av@gmail.com>
47 lines
1.5 KiB
Plaintext
47 lines
1.5 KiB
Plaintext
/*Auras are simple: They are simple overriders for attackbys, bullet_act, damage procs, etc. They also tick after their respective mob.
|
|
They should be used for undeterminate mob effects, like for instance a toggle-able forcefield, or indestructability as long as you don't move.
|
|
They should also be used for when you want to effect the ENTIRE mob, like having an armor buff or showering candy everytime you walk.
|
|
*/
|
|
|
|
/obj/aura
|
|
var/mob/living/user
|
|
|
|
/obj/aura/Initialize(mapload, ...)
|
|
. = ..()
|
|
RegisterSignal(src, COMSIG_ATOM_PRE_BULLET_ACT, PROC_REF(handle_bullet_act))
|
|
|
|
/obj/aura/proc/handle_bullet_act(datum/source, obj/projectile/projectile)
|
|
SIGNAL_HANDLER
|
|
|
|
return COMPONENT_BULLET_BLOCKED
|
|
|
|
/obj/aura/bullet_act(obj/projectile/hitting_projectile, def_zone, piercing_hit)
|
|
var/result = ..()
|
|
if(result == BULLET_ACT_BLOCK) //The bullet was blocked, don't check the remaining auras.
|
|
return AURA_FALSE|AURA_CANCEL
|
|
else if(result == BULLET_ACT_FORCE_PIERCE) //The bullet was forced to pierce, check the remaining auras to see if they block.
|
|
return AURA_FALSE
|
|
else
|
|
return
|
|
|
|
/obj/aura/Destroy()
|
|
if(user)
|
|
user.remove_aura(src)
|
|
return ..()
|
|
|
|
/obj/aura/proc/added_to(var/mob/living/target)
|
|
user = target
|
|
user.add_aura(src)
|
|
|
|
/obj/aura/proc/removed()
|
|
user = null
|
|
|
|
/obj/aura/proc/life_tick()
|
|
return FALSE
|
|
|
|
/obj/aura/attackby(obj/item/attacking_item, mob/user)
|
|
return FALSE
|
|
|
|
/obj/aura/hitby(atom/movable/hitting_atom, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
|
return FALSE
|