Merge pull request #14518 from necromanceranne/shield_explodies_fix

Shields: Changes, additional flags, bug fixes, sprites
This commit is contained in:
silicons
2021-03-27 01:31:55 -06:00
committed by GitHub
12 changed files with 182 additions and 106 deletions

View File

@@ -8,7 +8,7 @@
desc = "A resilient shield made out of brass.. It feels warm to the touch."
var/clockwork_desc = "A powerful shield of ratvarian making. It absorbs blocked attacks to charge devastating bashes."
armor = list("melee" = 80, "bullet" = 70, "laser" = -10, "energy" = -20, "bomb" = 60, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
shield_flags = SHIELD_FLAGS_DEFAULT
shield_flags = SHIELD_FLAGS_DEFAULT | SHIELD_KINETIC_STRONG | SHIELD_ENERGY_WEAK
max_integrity = 300 //High integrity, extremely strong against melee / bullets, but still quite easy to destroy with lasers and energy
repair_material = /obj/item/stack/tile/brass
var/dam_absorbed = 0

View File

@@ -262,70 +262,6 @@
/obj/item/assembly/flash/armimplant/proc/cooldown()
overheat = FALSE
/obj/item/assembly/flash/shield
name = "strobe shield"
desc = "A shield with a built in, high intensity light capable of blinding and disorienting suspects. Takes regular handheld flashes as bulbs."
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "flashshield"
item_state = "flashshield"
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
slot_flags = ITEM_SLOT_BACK
force = 10
throwforce = 5
throw_speed = 2
throw_range = 3
w_class = WEIGHT_CLASS_BULKY
custom_materials = list(/datum/material/glass=7500, /datum/material/iron=1000)
attack_verb = list("shoved", "bashed")
block_chance = 50
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 70)
/obj/item/assembly/flash/shield/flash_recharge(interval=10)
if(times_used >= 4)
burn_out()
return FALSE
return TRUE
/obj/item/assembly/flash/shield/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/assembly/flash/handheld))
var/obj/item/assembly/flash/handheld/flash = W
if(flash.crit_fail)
to_chat(user, "No sense replacing it with a broken bulb.")
return
else
to_chat(user, "You begin to replace the bulb.")
if(do_after(user, 20, target = src))
if(flash.crit_fail || !flash || QDELETED(flash))
return
crit_fail = FALSE
times_used = 0
playsound(src, 'sound/items/deconstruct.ogg', 50, TRUE)
update_icon()
flash.crit_fail = TRUE
flash.update_icon()
return
..()
/obj/item/assembly/flash/shield/update_icon(flash = FALSE)
icon_state = "flashshield"
item_state = "flashshield"
if(crit_fail)
icon_state = "riot"
item_state = "riot"
else if(flash)
icon_state = "flashshield_flash"
item_state = "flashshield_flash"
addtimer(CALLBACK(src, /atom/.proc/update_icon), 5)
if(holder)
holder.update_icon()
/obj/item/assembly/flash/shield/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
activate()
return ..()
//ported from tg - check to make sure it can't appear where it's not supposed to.
/obj/item/assembly/flash/hypnotic
desc = "A modified flash device, programmed to emit a sequence of subliminal flashes that can send a vulnerable target into a hypnotic trance."

View File

@@ -23,7 +23,7 @@
name = "Strobe Shield"
description = "One of our Emergency Response Agents thinks there's vampires in a local station. Send him something to help with his fear of the dark and protect him, too."
reward = 3000
wanted_types = list(/obj/item/assembly/flash/shield)
wanted_types = list(/obj/item/shield/riot/flash)
/datum/bounty/item/security/sechuds
name = "Sec HUDs"

View File

@@ -16,7 +16,7 @@
/datum/export/weapon/riot_shield
cost = 70
unit_name = "flash shield"
export_types = list(/obj/item/assembly/flash/shield)
export_types = list(/obj/item/shield/riot/flash)
/datum/export/weapon/tele_shield
cost = 100
@@ -138,7 +138,7 @@
export_types = list(/obj/item/gun/energy/xray)
/datum/export/weapon/ioncarbine
cost = 200
cost = 200
unit_name = "ion carbine"
export_types = list(/obj/item/gun/energy/ionrifle/carbine)

View File

@@ -457,23 +457,23 @@
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
/datum/design/laser_shield
name = "Laser Resistant Riot Shield"
desc = "An advanced riot shield made of darker glasses to prevent laser fire from passing through."
/datum/design/energy_shield
name = "Energy Resistant Shield"
desc = "An ablative shield designed to stop energy-based attacks dead in their tracks, but shatter easily against kinetic blows."
id = "laser_shield"
build_type = PROTOLATHE
materials = list(/datum/material/iron = 4000, /datum/material/glass = 1000, /datum/material/plastic = 4000, /datum/material/silver = 800, /datum/material/titanium = 600, /datum/material/plasma = 5000)
build_path = /obj/item/shield/riot/laser_proof
build_path = /obj/item/shield/riot/energy_proof
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY
/datum/design/bullet_shield
name = "Bullet Resistant Riot Shield"
desc = "An advanced riot shield made bullet resistant plastics and heavy metals to protect against projectile harm."
/datum/design/kinetic_shield
name = "Kinetic Resistant Shield"
desc = "An advanced polymer shield designed to stop kinetic-based attacks with ease, but splinter apart against energy-based attacks."
id = "bullet_shield"
build_type = PROTOLATHE
materials = list(/datum/material/iron = 4000, /datum/material/glass = 1000, /datum/material/silver = 2000, /datum/material/titanium = 1200, /datum/material/plastic = 2500)
build_path = /obj/item/shield/riot/bullet_proof
build_path = /obj/item/shield/riot/kinetic_proof
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SECURITY