mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 11:05:50 +01:00
Adds a bunch of stuff for sec armor. See PR for details.
This commit is contained in:
@@ -27,6 +27,9 @@
|
||||
/datum/uplink_category/stealth_items
|
||||
name = "Stealth and Camouflage Items"
|
||||
|
||||
/datum/uplink_category/armor
|
||||
name = "Armor"
|
||||
|
||||
/datum/uplink_category/tools
|
||||
name = "Devices and Tools"
|
||||
|
||||
|
||||
@@ -305,6 +305,22 @@ datum/uplink_item/dd_SortValue()
|
||||
item_cost = 6
|
||||
path = /obj/item/weapon/disk/file/cameras/syndicate
|
||||
|
||||
/********
|
||||
* Armor *
|
||||
********/
|
||||
/datum/uplink_item/item/armor
|
||||
category = /datum/uplink_category/armor
|
||||
|
||||
/datum/uplink_item/item/armor/combat
|
||||
name = "Combat Armor Set"
|
||||
item_cost = 5
|
||||
path = /obj/item/weapon/storage/box/syndie_kit/combat_armor
|
||||
|
||||
/datum/uplink_item/item/armor/heavy_vest
|
||||
name = "Heavy Armor Vest"
|
||||
item_cost = 4
|
||||
path = /obj/item/clothing/suit/storage/vest/heavy/merc
|
||||
|
||||
/********************
|
||||
* Devices and Tools *
|
||||
********************/
|
||||
@@ -351,11 +367,6 @@ datum/uplink_item/dd_SortValue()
|
||||
item_cost = 3
|
||||
path = /obj/item/clothing/glasses/thermal/syndi
|
||||
|
||||
/datum/uplink_item/item/tools/heavy_vest
|
||||
name = "Heavy Armor Vest"
|
||||
item_cost = 4
|
||||
path = /obj/item/clothing/suit/storage/vest/heavy/merc
|
||||
|
||||
/datum/uplink_item/item/tools/powersink
|
||||
name = "Powersink (DANGER!)"
|
||||
item_cost = 5
|
||||
@@ -385,7 +396,7 @@ datum/uplink_item/dd_SortValue()
|
||||
item_cost = 3
|
||||
path = /obj/item/weapon/storage/secure/briefcase/money
|
||||
desc = "A briefcase with 10,000 untraceable thalers for funding your sneaky activities."
|
||||
|
||||
|
||||
/datum/uplink_item/item/tools/crystal
|
||||
name = "Tradable Crystal"
|
||||
item_cost = 1
|
||||
|
||||
@@ -61,6 +61,9 @@ var/datum/uplink_random_selection/default_uplink_selection = new/datum/uplink_ra
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealth_items/voice)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/stealth_items/camera_floppy, 10, 0)
|
||||
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/armor/heavy_vest)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/armor/combat)
|
||||
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/toolbox, reselect_propbability = 10)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/plastique)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/encryptionkey_radio)
|
||||
@@ -69,7 +72,6 @@ var/datum/uplink_random_selection/default_uplink_selection = new/datum/uplink_ra
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/clerical)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/space_suit, 50, 10)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/thermal)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/heavy_vest)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/powersink, 10, 10)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/ai_module, 25, 0)
|
||||
items += new/datum/uplink_random_item(/datum/uplink_item/item/tools/teleporter, 10, 0)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
/obj/item/weapon/shield/riot
|
||||
name = "riot shield"
|
||||
desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder."
|
||||
desc = "A shield adept for close quarters engagement. It's also capable of protecting from less powerful projectiles."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "riot"
|
||||
flags = CONDUCT
|
||||
@@ -65,17 +65,31 @@
|
||||
attack_verb = list("shoved", "bashed")
|
||||
var/cooldown = 0 //shield bash cooldown. based on world.time
|
||||
|
||||
/obj/item/weapon/shield/riot/handle_shield(mob/user)
|
||||
. = ..()
|
||||
if(.) playsound(user.loc, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
/obj/item/weapon/shield/riot/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
|
||||
if(user.incapacitated())
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/shield/riot/get_block_chance(mob/user, var/damage, atom/damage_source = null, mob/attacker = null)
|
||||
if(istype(damage_source, /obj/item/projectile))
|
||||
var/obj/item/projectile/P = damage_source
|
||||
//plastic shields do not stop bullets or lasers, even in space. Will block beanbags, rubber bullets, and stunshots just fine though.
|
||||
if((is_sharp(P) && damage > 10) || istype(P, /obj/item/projectile/beam))
|
||||
return 0
|
||||
return base_block_chance
|
||||
//block as long as they are not directly behind us
|
||||
var/bad_arc = reverse_direction(user.dir) //arc of directions from which we cannot block
|
||||
if(check_shield_arc(user, bad_arc, damage_source, attacker))
|
||||
if(prob(get_block_chance(user, damage, damage_source, attacker)))
|
||||
//At this point, we succeeded in our roll for a block attempt, however these kinds of shields struggle to stand up
|
||||
//to strong bullets and lasers. They still do fine to pistol rounds of all kinds, however.
|
||||
if(istype(damage_source, /obj/item/projectile))
|
||||
var/obj/item/projectile/P = damage_source
|
||||
if((is_sharp(P) && P.armor_penetration >= 10) || istype(P, /obj/item/projectile/beam))
|
||||
//If we're at this point, the bullet/beam is going to go through the shield, however it will hit for less damage.
|
||||
//Bullets get slowed down, while beams are diffused as they hit the shield, so these shields are not /completely/
|
||||
//useless. Extremely penetrating projectiles will go through the shield without less damage.
|
||||
user.visible_message("<span class='danger'>\The [user]'s [src.name] is pierced by [attack_text]!</span>")
|
||||
if(P.armor_penetration < 30) //PTR bullets and x-rays will bypass this entirely.
|
||||
P.damage = P.damage / 2
|
||||
return 0
|
||||
//Otherwise, if we're here, we're gonna stop the attack entirely.
|
||||
user.visible_message("<span class='danger'>\The [user] blocks [attack_text] with \the [src]!</span>")
|
||||
playsound(user.loc, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/shield/riot/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/melee/baton))
|
||||
|
||||
@@ -256,4 +256,14 @@
|
||||
new /obj/item/weapon/spacecash/c1000(src)
|
||||
new /obj/item/weapon/spacecash/c1000(src)
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/combat_armor
|
||||
name = "combat armor kit"
|
||||
desc = "Contains a full set of combat armor."
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/combat_armor/New()
|
||||
..()
|
||||
new /obj/item/clothing/head/helmet/combat(src)
|
||||
new /obj/item/clothing/suit/armor/combat(src)
|
||||
new /obj/item/clothing/gloves/arm_guard/combat(src)
|
||||
new /obj/item/clothing/shoes/leg_guard/combat(src)
|
||||
return
|
||||
Reference in New Issue
Block a user