Fixes some bugs tangentially related to Vox code

This commit is contained in:
Anewbe
2018-09-04 21:36:12 -05:00
parent 08ddd217a8
commit 8c5562b4bc
15 changed files with 36 additions and 45 deletions

View File

@@ -40,15 +40,11 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi')
obj/var/contaminated = 0
obj/var/phoronproof = 0
/obj/item/proc/can_contaminate()
//Clothing and backpacks can be contaminated.
if(flags & PHORONGUARD)
return 0
else if(phoronproof == 1)
return 0
else if(istype(src,/obj/item/weapon/storage/backpack))
return 0 //Cannot be washed :(
else if(istype(src,/obj/item/clothing))
@@ -144,7 +140,7 @@ obj/var/phoronproof = 0
//Checks if the head is adequately sealed. //This is just odd. TODO: Make this respect the body_parts_covered stuff like thermal gear does.
if(head)
if(vsc.plc.PHORONGUARD_ONLY)
if(head.flags & PHORONGUARD || head.phoronproof)
if(head.flags & PHORONGUARD)
return 1
else if(head.body_parts_covered & EYES)
return 1
@@ -156,7 +152,7 @@ obj/var/phoronproof = 0
for(var/obj/item/protection in list(wear_suit, gloves, shoes)) //This is why it's odd. If I'm in a full suit, but my shoes and gloves aren't phoron proof, damage.
if(!protection)
continue
if(vsc.plc.PHORONGUARD_ONLY && !(protection.flags & PHORONGUARD) && !protection.phoronproof)
if(vsc.plc.PHORONGUARD_ONLY && !(protection.flags & PHORONGUARD))
return 0
coverage |= protection.body_parts_covered

View File

@@ -145,7 +145,7 @@ BLIND // can't see anything
/obj/item/clothing/glasses/night/vox
name = "Alien Optics"
species_restricted = list("Vox")
phoronproof = 1
flags = PHORONGUARD
/obj/item/clothing/glasses/night/New()
..()

View File

@@ -105,9 +105,8 @@
name = "insulated gauntlets"
icon_state = "gloves-vox"
item_state = "gloves-vox"
item_flags = PHORONGUARD
flags = PHORONGUARD
siemens_coefficient = 0
phoronproof = 1
permeability_coefficient = 0.05
species_restricted = list("Vox")

View File

@@ -142,8 +142,7 @@
desc = "Ave, Imperator, morituri te salutant."
icon_state = "gladiator"
item_state_slots = list(slot_r_hand_str = "vhelmet", slot_l_hand_str = "vhelmet")
flags = BLOCKHAIR
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|BLOCKHAIR
siemens_coefficient = 1
valid_accessory_slots = null

View File

@@ -62,8 +62,8 @@
/obj/item/clothing/mask/gas/swat/vox
name = "\improper alien mask"
desc = "Clearly not designed for a human face."
item_flags = BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT | PHORONGUARD
phoronproof = 1
flags = PHORONGUARD
item_flags = BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT
species_restricted = list(SPECIES_VOX)
filtered_gases = list("oxygen", "sleeping_agent")
var/mask_open = FALSE // Controls if the Vox can eat through this mask
@@ -72,15 +72,17 @@
/obj/item/clothing/mask/gas/swat/vox/proc/feeding_port(mob/user)
if(user.canmove && !user.stat)
mask_open = !mask_open
if (mask_open)
body_parts_covered = body_parts_covered & ~FACE
if(mask_open)
body_parts_covered = EYES
to_chat(user, "Your mask moves to allow you to eat.")
else
body_parts_covered = initial(body_parts_covered)
body_parts_covered = FACE|EYES
to_chat(user, "Your mask moves to cover your mouth.")
return
/obj/item/clothing/mask/gas/swat/vox/attack_self(mob/user)
feeding_port(user)
..()
/obj/item/clothing/mask/gas/syndicate
name = "tactical mask"

View File

@@ -86,8 +86,7 @@
name = "vox magclaws"
item_state = "boots-vox"
icon_state = "boots-vox"
item_flags = PHORONGUARD
phoronproof = 1
flags = PHORONGUARD
species_restricted = list(SPECIES_VOX)
action_button_name = "Toggle the magclaws"

View File

@@ -31,9 +31,9 @@
// Can't be equipped by any other species due to bone structure and vox cybernetics.
/obj/item/clothing/suit/space/vox
w_class = ITEMSIZE_NORMAL
item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL | PHORONGUARD
flags = PHORONGUARD
item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank)
phoronproof = 1
armor = list(melee = 60, bullet = 50, laser = 40,energy = 15, bomb = 30, bio = 100, rad = 50)
siemens_coefficient = 0.2
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
@@ -43,9 +43,9 @@
/obj/item/clothing/head/helmet/space/vox
armor = list(melee = 60, bullet = 50, laser = 40, energy = 15, bomb = 30, bio = 100, rad = 50)
siemens_coefficient = 0.2
item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT | PHORONGUARD
flags = PHORONGUARD
item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT
flags_inv = 0
phoronproof = 1
species_restricted = list(SPECIES_VOX)
/obj/item/clothing/head/helmet/space/vox/pressure

View File

@@ -47,9 +47,8 @@
suit_type = "alien"
icon_state = "vox_rig"
armor = list(melee = 60, bullet = 50, laser = 40, energy = 15, bomb = 30, bio = 100, rad = 50)
item_flags = THICKMATERIAL
item_flags = THICKMATERIAL|PHORONGUARD
siemens_coefficient = 0.2
phoronproof = 1
offline_slowdown = 5
allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit)
@@ -63,7 +62,6 @@
/obj/item/clothing/head/helmet/space/rig/vox
species_restricted = list(SPECIES_VOX)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
phoronproof = 1
/obj/item/clothing/shoes/magboots/rig/vox
name = "talons"
@@ -71,11 +69,9 @@
sprite_sheets = list(
SPECIES_VOX = 'icons/mob/species/vox/shoes.dmi'
)
phoronproof = 1
/obj/item/clothing/suit/space/rig/vox
species_restricted = list(SPECIES_VOX)
phoronproof = 1
/obj/item/clothing/gloves/gauntlets/rig/vox
siemens_coefficient = 0
@@ -83,14 +79,12 @@
sprite_sheets = list(
SPECIES_VOX = 'icons/mob/species/vox/gloves.dmi'
)
phoronproof = 1
/obj/item/weapon/rig/vox/carapace
name = "dense alien control module"
suit_type = "dense alien"
armor = list(melee = 60, bullet = 50, laser = 40, energy = 15, bomb = 30, bio = 100, rad = 50)
emp_protection = 40 //change this to 30 if too high.
phoronproof = 1
req_access = list(access_syndicate)
@@ -111,7 +105,6 @@
icon_state = "voxstealth_rig"
armor = list(melee = 40, bullet = 30, laser = 30, energy = 15, bomb = 30, bio = 100, rad = 50)
emp_protection = 40 //change this to 30 if too high.
phoronproof = 1
req_access = list(access_syndicate)

View File

@@ -6,6 +6,7 @@
name = "Space helmet"
icon_state = "space"
desc = "A special helmet designed for work in a hazardous, low-pressure environment."
flags = PHORONGUARD
item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT
permeability_coefficient = 0.01
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
@@ -16,7 +17,6 @@
siemens_coefficient = 0.9
species_restricted = list("exclude",SPECIES_DIONA)
preserve_item = 1
phoronproof = 1
flash_protection = FLASH_PROTECTION_MAJOR
valid_accessory_slots = null
@@ -55,7 +55,8 @@
w_class = ITEMSIZE_HUGE // So you can't fit this in your bag and be prepared at all times.
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.02
item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL
flags = PHORONGUARD
item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL | PHORONGUARD
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency/oxygen,/obj/item/device/suit_cooling_unit)
slowdown = 3
@@ -66,7 +67,6 @@
siemens_coefficient = 0.9
species_restricted = list("exclude",SPECIES_DIONA)
preserve_item = 1
phoronproof = 1
var/list/supporting_limbs //If not-null, automatically splints breaks. Checked when removing the suit.

View File

@@ -8,8 +8,7 @@
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|BLOCKHAIR
body_parts_covered = HEAD|FACE|EYES
siemens_coefficient = 0.9
item_flags = THICKMATERIAL
phoronproof = 1
item_flags = THICKMATERIAL | PHORONGUARD
/obj/item/clothing/suit/bio_suit
name = "bio suit"
@@ -24,8 +23,7 @@
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL|HIDETIE|HIDEHOLSTER
siemens_coefficient = 0.9
item_flags = THICKMATERIAL
phoronproof = 1
item_flags = THICKMATERIAL | PHORONGUARD
//Standard biosuit, orange stripe
/obj/item/clothing/head/bio_hood/general

View File

@@ -2,7 +2,7 @@
has_sensor = 0
species_restricted = list(SPECIES_VOX)
starting_accessories = list(/obj/item/clothing/accessory/storage/vox) // Dont' start with a backback, so free webbing
phoronproof = 1
flags = PHORONGUARD
/obj/item/clothing/under/vox/vox_casual
name = "alien clothing"
@@ -23,6 +23,8 @@
desc = "An alien mesh. Seems to be made up mostly of pockets and writhing flesh."
icon_state = "webbing-vox"
flags = PHORONGUARD
slots = 3
/obj/item/clothing/accessory/storage/vox/New()

View File

@@ -2,7 +2,6 @@
category_text = "Reagent"
var/volume = 0
unacidable = 1
phoronproof = 1
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2)
/obj/item/integrated_circuit/reagent/New()

View File

@@ -166,7 +166,7 @@ emp_act
// Checked in borer code
/mob/living/carbon/human/proc/check_head_coverage()
var/obj/item/organ/external/H = organs_by_name[BP_HEAD]
var/list/body_parts = H.get_covering_clothing()
var/list/body_parts = H.get_covering_clothing(EYES)
if(LAZYLEN(body_parts))
return 1
return 0
@@ -174,7 +174,7 @@ emp_act
//Used to check if they can be fed food/drinks/pills
/mob/living/carbon/human/proc/check_mouth_coverage()
var/obj/item/organ/external/H = organs_by_name[BP_HEAD]
var/list/protective_gear = H.get_covering_clothing()
var/list/protective_gear = H.get_covering_clothing(FACE)
for(var/obj/item/gear in protective_gear)
if(istype(gear) && (gear.body_parts_covered & FACE) && !(gear.item_flags & FLEXIBLEMATERIAL))
return gear

View File

@@ -1332,12 +1332,16 @@ Note that amputating the affected organ does in fact remove the infection from t
return english_list(flavor_text)
// Returns a list of the clothing (not glasses) that are covering this part
/obj/item/organ/external/proc/get_covering_clothing()
/obj/item/organ/external/proc/get_covering_clothing(var/target_covering) // target_covering checks for mouth/eye coverage
var/list/covering_clothing = list()
if(!target_covering)
target_covering = src.body_part
if(owner)
var/list/protective_gear = list(owner.head, owner.wear_mask, owner.wear_suit, owner.w_uniform, owner.gloves, owner.shoes)
var/list/protective_gear = list(owner.head, owner.wear_mask, owner.wear_suit, owner.w_uniform, owner.gloves, owner.shoes, owner.glasses)
for(var/obj/item/clothing/gear in protective_gear)
if(gear.body_parts_covered & src.body_part)
if(gear.body_parts_covered & target_covering)
covering_clothing |= gear
if(LAZYLEN(gear.accessories))
for(var/obj/item/clothing/accessory/bling in gear.accessories)

View File

@@ -426,7 +426,7 @@
if(alien != IS_SLIME)
return
else if(eyes_covered)
to_chat(M, "<span class='warning'>Your [safe_thing] protect you from most of the pepperspray!</span>")
to_chat(M, "<span class='warning'>Your [safe_thing] protects you from most of the pepperspray!</span>")
M.eye_blurry = max(M.eye_blurry, effective_strength * 3)
M.Blind(effective_strength)
M.Stun(5)