Hardsuit fixes and grenade launcher restrictions (#3536)

This commit is contained in:
Alberyk
2017-10-07 02:45:07 -03:00
committed by Lohikar
parent 8c0ac3ae43
commit 12597e9849
7 changed files with 19 additions and 3 deletions

View File

@@ -46,6 +46,7 @@
/obj/item/clothing/head/helmet/space/rig/military
light_overlay = "helmet_light_dual_green"
light_color = "#3e7c3e"
species_restricted = list("Human")
/obj/item/clothing/suit/space/rig/military

View File

@@ -82,6 +82,7 @@
chest_type = /obj/item/clothing/suit/space/rig/light/ninja
glove_type = /obj/item/clothing/gloves/rig/light/ninja
helm_type = /obj/item/clothing/head/helmet/space/light/ninja
req_access = list(access_syndicate)
@@ -108,9 +109,12 @@
siemens_coefficient = 0
/obj/item/clothing/suit/space/rig/light/ninja
species_restricted = list("exclude","Diona","Xenomorph")
species_restricted = list("exclude","Diona","Xenomorph", "Golem")
breach_threshold = 38 //comparable to regular hardsuits
/obj/item/clothing/head/helmet/space/light/ninja
species_restricted = list("exclude","Diona","Xenomorph", "Golem")
/obj/item/weapon/rig/light/stealth
name = "stealth suit control module"
suit_type = "stealth"

View File

@@ -12,6 +12,10 @@
throw_distance = 7
release_force = 5
var/blacklisted_grenades = list(
/obj/item/weapon/grenade/flashbang/clusterbang,
/obj/item/weapon/grenade/frag)
var/obj/item/weapon/grenade/chambered
var/list/grenades = new/list()
var/max_grenades = 5 //holds this + one in the chamber
@@ -43,6 +47,8 @@
user << "\A [chambered] is chambered."
/obj/item/weapon/gun/launcher/grenade/proc/load(obj/item/weapon/grenade/G, mob/user)
if(!can_load_grenade_type(G, user))
return
if(grenades.len >= max_grenades)
user << "<span class='warning'>[src] is full.</span>"
return
@@ -60,6 +66,12 @@
else
user << "<span class='warning'>[src] is empty.</span>"
/obj/item/weapon/gun/launcher/grenade/proc/can_load_grenade_type(obj/item/weapon/grenade/G, mob/user)
if(is_type_in_list(G, blacklisted_grenades))
user << "<span class='warning'>\The [G] doesn't seem to fit in \the [src]!</span>"
return FALSE
return TRUE
/obj/item/weapon/gun/launcher/grenade/attack_self(mob/user)
pump(user)

View File

@@ -63,7 +63,7 @@
var/container_type = /obj/item/weapon/reagent_containers/glass/beaker
var/list/starting_chems = null
/obj/item/weapon/gun/projectile/dartgun/dartgun/Initialize()
/obj/item/weapon/gun/projectile/dartgun/Initialize()
. = ..()
if(starting_chems)
for(var/chem in starting_chems)