From 15118fb23b09551ab7e15bdff851e0d850403644 Mon Sep 17 00:00:00 2001 From: "uhangi@gmail.com" Date: Mon, 27 Sep 2010 03:13:49 +0000 Subject: [PATCH] Added riot shields. Block bullets a large percent of the time, and blunt objects just as much as armor does. Also readded riot crate in QM. I did the inhand sprites, yay. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@183 316c924e-a436-60f5-8080-3fe189b3f50e --- code/defines/obj/weapon.dm | 17 ++++++++++++++ code/game/machinery/autolathe.dm | 1 + code/game/objects/closets/secure/security.dm | 5 ++++- code/game/objects/items/item.dm | 12 ++++++++++ code/game/supplyshuttle.dm | 13 ++++------- code/modules/mob/living/carbon/human/human.dm | 21 ++++++++++++++++++ config/admins.txt | 2 +- icons/changelog.html | 5 +++++ icons/mob/items_lefthand.dmi | Bin 65171 -> 65771 bytes icons/mob/items_righthand.dmi | Bin 65236 -> 65731 bytes maps/trunkmap.dmm | 4 ++-- 11 files changed, 67 insertions(+), 13 deletions(-) diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index 7850d92ef50..df78c4fbcf0 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -2,6 +2,23 @@ name = "weapon" icon = 'weapons.dmi' +/obj/item/weapon/shield + name = "shield" + +/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." + icon = 'weapons.dmi' + icon_state = "riot" + flags = FPRINT | TABLEPASS| CONDUCT + force = 5.0 + throwforce = 5.0 + throw_speed = 1 + throw_range = 4 + w_class = 4.0 + g_amt = 7500 + m_amt = 1000 + /obj/item/weapon/rcd name = "rapid-construction-device (RCD)" desc = "A device used to rapidly build walls/floor." diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index e0aa163aff8..bff96a1e3df 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -172,6 +172,7 @@ src.L += new /obj/item/weapon/rcd_ammo(src) src.L += new /obj/item/weapon/scalpel(src) src.L += new /obj/item/weapon/circular_saw(src) + src.L += new /obj/item/weapon/shield/riot(src) src.L += new /obj/item/device/t_scanner(src) src.L += new /obj/item/weapon/reagent_containers/glass/bucket(src) src.LL += new /obj/item/weapon/flamethrower(src) diff --git a/code/game/objects/closets/secure/security.dm b/code/game/objects/closets/secure/security.dm index 4a6335c531c..358547ea13a 100644 --- a/code/game/objects/closets/secure/security.dm +++ b/code/game/objects/closets/secure/security.dm @@ -3,7 +3,8 @@ sleep(2) //new /obj/item/weapon/storage/flashbang_kit(src) // Seriously gimping the number of flashes security get, will probably change later -- TLE - new /obj/item/weapon/flashbang + new /obj/item/weapon/flashbang(src) + new /obj/item/weapon/shield/riot(src) new /obj/item/weapon/handcuffs(src) new /obj/item/weapon/gun/energy/taser_gun(src) new /obj/item/device/flash(src) @@ -39,6 +40,7 @@ /obj/secure_closet/highsec/New() ..() sleep(2) + new /obj/item/weapon/shield/riot(src) new /obj/item/weapon/gun/energy/general( src ) new /obj/item/device/flash( src ) new /obj/item/weapon/storage/id_kit( src ) @@ -52,6 +54,7 @@ /obj/secure_closet/hos/New() ..() sleep(2) + new /obj/item/weapon/shield/riot(src) new /obj/item/weapon/gun/energy/general( src ) new /obj/item/device/flash( src ) new /obj/item/weapon/storage/id_kit( src ) diff --git a/code/game/objects/items/item.dm b/code/game/objects/items/item.dm index c3b4e000c86..93006d78949 100644 --- a/code/game/objects/items/item.dm +++ b/code/game/objects/items/item.dm @@ -222,6 +222,12 @@ if (b_dam && ((istype(H.wear_suit, /obj/item/clothing/suit/armor/)) && H.wear_suit.body_parts_covered & UPPER_TORSO) && prob(90 - src.force)) H.show_message("\red You have been protected from a hit to the chest.") return + if (b_dam && ((istype(H.r_hand, /obj/item/weapon/shield/riot))) && prob(90 - src.force)) + H.show_message("\red You have been protected from a hit to the chest.") + return + if (b_dam && ((istype(H.l_hand, /obj/item/weapon/shield/riot))) && prob(90 - src.force)) + H.show_message("\red You have been protected from a hit to the chest.") + return if ((b_dam && prob(src.force + affecting.brute_dam + affecting.burn_dam))) if (prob(50)) if (H.weakened < 5) @@ -260,6 +266,12 @@ if (b_dam && (istype(H.wear_suit, /obj/item/clothing/suit/armor/) && H.wear_suit.body_parts_covered & LOWER_TORSO) && prob(90 - src.force)) H.show_message("\red You have been protected from a hit to the groin (phew).") return + if (b_dam && ((istype(H.r_hand, /obj/item/weapon/shield/riot))) && prob(90 - src.force)) + H.show_message("\red You have been protected from a hit to the groin (phew).") + return + if (b_dam && ((istype(H.l_hand, /obj/item/weapon/shield/riot))) && prob(90 - src.force)) + H.show_message("\red You have been protected from a hit to the groin (phew).") + return if ((b_dam && prob(src.force + affecting.brute_dam + affecting.burn_dam))) if (prob(50)) if (H.weakened < 5) diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index c3ccde664b3..4499cd26f7c 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -195,26 +195,21 @@ var/supply_shuttle_points = 50 containertype = "/obj/crate/secure/weapon" containername = "Experimental weapons crate" access = access_heads -/* + /datum/supply_packs/riot name = "Riot crate" contains = list("/obj/item/weapon/baton", - "/obj/item/weapon/baton", "/obj/item/weapon/baton", "/obj/item/weapon/shield/riot", "/obj/item/weapon/shield/riot", - "/obj/item/weapon/shield/riot", - "/obj/item/weapon/smokebomb", - "/obj/item/weapon/smokebomb", - "/obj/item/weapon/smokebomb", - "/obj/item/weapon/handcuffs", + "/obj/item/weapon/storage/flashbang_kit", + "/obj/item/weapon/storage/flashbang_kit", "/obj/item/weapon/handcuffs", "/obj/item/weapon/handcuffs") - cost = 20 + cost = 30 containertype = "/obj/crate/secure/gear" containername = "Riot crate" access = access_security -*/ /datum/supply_packs/evacuation name = "Emergency equipment" diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index b3ec3771cc8..38e5e29b404 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -222,6 +222,27 @@ if (prob(60)) d = d / 2 d = d / 5 + if (istype(src.r_hand, /obj/item/weapon/shield/riot)) + if (prob(70)) + show_message("\red Your shield absorbs the blow!", 4) + return + else + if (prob(40)) + show_message("\red Your shield only softens the blow!", 4) + if (prob(60)) + d = d / 2 + d = d / 5 + else + if (istype(src.l_hand, /obj/item/weapon/shield/riot)) + if (prob(70)) + show_message("\red Your shield absorbs the blow!", 4) + return + else + if (prob(40)) + show_message("\red Your shield only softens the blow!", 4) + if (prob(60)) + d = d / 2 + d = d / 5 if (src.stat != 2) var/organ = src.organs[ran_zone("chest")] if (istype(organ, /datum/organ/external)) diff --git a/config/admins.txt b/config/admins.txt index 44e89a197e0..19d4b94c333 100644 --- a/config/admins.txt +++ b/config/admins.txt @@ -1,3 +1,3 @@ tle - Host - +uhangi - Host mport2004 - Coder diff --git a/icons/changelog.html b/icons/changelog.html index 633d2f77755..1300547f7be 100644 --- a/icons/changelog.html +++ b/icons/changelog.html @@ -42,6 +42,11 @@

Changelog

+
Sunday, September 26, 17:51
+ +
Tuesday, September 21, 17:51