Alright
This commit is contained in:
@@ -357,20 +357,41 @@ obj/item/shield/riot/bullet_proof
|
||||
block_chance = 50
|
||||
|
||||
/obj/item/shield/riot/implant
|
||||
name = "riot tower shield"
|
||||
desc = "A massive shield that can block a lot of attacks and can take a lot of abuse before breaking." //It cant break unless it is removed from the implant
|
||||
name = "telescoping shield implant"
|
||||
desc = "A compact, arm-mounted telescopic shield. While nigh-indestructible when powered by a host user, it will eventually overload from damage. Recharges while inside its implant."
|
||||
item_state = "metal"
|
||||
icon_state = "metal"
|
||||
block_chance = 30 //May be big but hard to move around to block.
|
||||
block_chance = 50
|
||||
slowdown = 1
|
||||
shield_flags = SHIELD_FLAGS_DEFAULT
|
||||
item_flags = SLOWS_WHILE_IN_HAND
|
||||
var/recharge_timerid
|
||||
var/recharge_delay = 15 SECONDS
|
||||
|
||||
/obj/item/shield/riot/implant/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
if(attack_type & ATTACK_TYPE_PROJECTILE)
|
||||
final_block_chance = 60 //Massive shield
|
||||
return ..()
|
||||
/// Entirely overriden take_damage.
|
||||
/obj/item/shield/riot/implant/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir, armour_penetration = 0)
|
||||
obj_integrity -= damage_amount
|
||||
if(obj_integrity < 0)
|
||||
obj_integrity = 0
|
||||
if(obj_integrity == 0)
|
||||
if(ismob(loc))
|
||||
var/mob/living/L = loc
|
||||
L.visible_message("<span class='boldwarning'>[src] overloads from the damage sustained!</span>")
|
||||
L.dropItemToGround(src) //implant component catch hook will grab it.
|
||||
|
||||
/obj/item/shield/riot/implant/Moved()
|
||||
. = ..()
|
||||
if(istype(loc, /obj/item/organ/cyberimp/arm/shield))
|
||||
recharge_timerid = addtimer(CALLBACK(src, .proc/recharge), recharge_delay, flags = TIMER_STOPPABLE)
|
||||
else //extending
|
||||
if(recharge_timerid)
|
||||
deltimer(recharge_timerid)
|
||||
recharge_timerid = null
|
||||
|
||||
/obj/item/shield/riot/implant/proc/recharge()
|
||||
obj_integrity = max_integrity
|
||||
if(ismob(loc.loc)) //cyberimplant.user
|
||||
to_chat(loc, "<span class='notice'>[src] has recharged its reinforcement matrix and is ready for use!</span>")
|
||||
|
||||
/obj/item/shield/energy
|
||||
name = "energy combat shield"
|
||||
|
||||
@@ -229,6 +229,7 @@
|
||||
var/flashcd = 20
|
||||
var/overheat = 0
|
||||
var/obj/item/organ/cyberimp/arm/flash/I = null
|
||||
var/active_light_strength = 7
|
||||
|
||||
/obj/item/assembly/flash/armimplant/burn_out()
|
||||
if(I && I.owner)
|
||||
@@ -248,6 +249,12 @@
|
||||
update_icon(1)
|
||||
return TRUE
|
||||
|
||||
/obj/item/assembly/flash/armimplant/Moved(oldLoc, dir)
|
||||
. = ..()
|
||||
if(!ismob(loc))
|
||||
set_light(0)
|
||||
else
|
||||
set_light(7)
|
||||
|
||||
/obj/item/assembly/flash/armimplant/proc/cooldown()
|
||||
overheat = FALSE
|
||||
|
||||
@@ -20,7 +20,27 @@
|
||||
|
||||
update_icon()
|
||||
SetSlotFromZone()
|
||||
items_list = contents.Copy()
|
||||
for(var/obj/item/I in contents)
|
||||
add_item(I)
|
||||
|
||||
/obj/item/organ/cyberimp/arm/proc/add_item(obj/item/I)
|
||||
if(I in items_list)
|
||||
return
|
||||
I.forceMove(src)
|
||||
items_list += I
|
||||
// ayy only dropped signal for performance, we can't possibly have shitcode that doesn't call it when removing items from a mob, right?
|
||||
// .. right??!
|
||||
RegisterSignal(I, COMSIG_ITEM_DROPPED, .proc/magnetic_catch)
|
||||
|
||||
/obj/item/organ/cyberimp/arm/proc/magnetic_catch(datum/source, mob/user)
|
||||
var/obj/item/I = source //if someone is misusing the signal, just runtime
|
||||
if(I in items_list)
|
||||
if(I in contents) //already in us somehow? i probably shouldn't catch this so it's easier to spot bugs but eh..
|
||||
return
|
||||
I.visible_message("<span class='notice'>[I] snaps back into [src]!</span>")
|
||||
I.forceMove(contents)
|
||||
if(I == holder)
|
||||
holder = null
|
||||
|
||||
/obj/item/organ/cyberimp/arm/proc/SetSlotFromZone()
|
||||
switch(zone)
|
||||
@@ -62,7 +82,7 @@
|
||||
. = ..()
|
||||
if(. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(prob(15/severity) && owner)
|
||||
if(owner)
|
||||
to_chat(owner, "<span class='warning'>[src] is hit by EMP!</span>")
|
||||
// give the owner an idea about why his implant is glitching
|
||||
Retract()
|
||||
@@ -75,29 +95,20 @@
|
||||
"<span class='notice'>[holder] snaps back into your [zone == BODY_ZONE_R_ARM ? "right" : "left"] arm.</span>",
|
||||
"<span class='italics'>You hear a short mechanical noise.</span>")
|
||||
|
||||
if(istype(holder, /obj/item/assembly/flash/armimplant))
|
||||
var/obj/item/assembly/flash/F = holder
|
||||
F.set_light(0)
|
||||
|
||||
owner.transferItemToLoc(holder, src, TRUE)
|
||||
holder = null
|
||||
playsound(get_turf(owner), 'sound/mecha/mechmove03.ogg', 50, 1)
|
||||
|
||||
/obj/item/organ/cyberimp/arm/proc/Extend(var/obj/item/item)
|
||||
/obj/item/organ/cyberimp/arm/proc/Extend(obj/item/item)
|
||||
if(!(item in src))
|
||||
return
|
||||
|
||||
holder = item
|
||||
|
||||
ADD_TRAIT(holder, TRAIT_NODROP, HAND_REPLACEMENT_TRAIT)
|
||||
holder.resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
holder.slot_flags = null
|
||||
holder.set_custom_materials(null)
|
||||
|
||||
if(istype(holder, /obj/item/assembly/flash/armimplant))
|
||||
var/obj/item/assembly/flash/F = holder
|
||||
F.set_light(7)
|
||||
|
||||
var/obj/item/arm_item = owner.get_active_held_item()
|
||||
|
||||
if(arm_item)
|
||||
@@ -223,21 +234,6 @@
|
||||
icon_state = "arm_taser"
|
||||
contents = newlist(/obj/item/gun/energy/e_gun/advtaser/mounted)
|
||||
|
||||
/obj/item/organ/cyberimp/arm/gun/emp_act(severity)
|
||||
. = ..()
|
||||
if(. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(prob(30/severity) && owner && !(organ_flags & ORGAN_FAILING))
|
||||
Retract()
|
||||
owner.visible_message("<span class='danger'>A loud bang comes from [owner]\'s [zone == BODY_ZONE_R_ARM ? "right" : "left"] arm!</span>")
|
||||
playsound(get_turf(owner), 'sound/weapons/flashbang.ogg', 100, 1)
|
||||
to_chat(owner, "<span class='userdanger'>You feel an explosion erupt inside your [zone == BODY_ZONE_R_ARM ? "right" : "left"] arm as your implant breaks!</span>")
|
||||
owner.adjust_fire_stacks(20)
|
||||
owner.IgniteMob()
|
||||
owner.adjustFireLoss(25)
|
||||
crit_fail = 1
|
||||
organ_flags |= ORGAN_FAILING
|
||||
|
||||
/obj/item/organ/cyberimp/arm/flash
|
||||
name = "integrated high-intensity photon projector" //Why not
|
||||
desc = "An integrated projector mounted onto a user's arm that is able to be used as a powerful flash."
|
||||
@@ -275,6 +271,12 @@
|
||||
desc = "A deployable riot shield to help deal with civil unrest."
|
||||
contents = newlist(/obj/item/shield/riot/implant)
|
||||
|
||||
/obj/item/organ/cyberimp/arm/shield/Extend(obj/item/I)
|
||||
if(item.obj_integrity == 0) //that's how the shield recharge works
|
||||
to_chat(owner, "<span class='warning'>[I] is still too unstable to extend. Give it some time!</span>")
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/cyberimp/arm/shield/emag_act()
|
||||
. = ..()
|
||||
if(obj_flags & EMAGGED)
|
||||
|
||||
Reference in New Issue
Block a user