mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Fixes #2365
This commit is contained in:
@@ -1,14 +1,19 @@
|
|||||||
//This is a generic proc that should be called by other ling armor procs to equip them.
|
//This is a generic proc that should be called by other ling armor procs to equip them.
|
||||||
/mob/proc/changeling_generic_armor(var/armor_type, var/helmet_type, var/boot_type)
|
/mob/proc/changeling_generic_armor(var/armor_type, var/helmet_type, var/boot_type, var/chem_cost)
|
||||||
var/datum/changeling/changeling = changeling_power(20,1,100,CONSCIOUS)
|
|
||||||
if(!changeling)
|
|
||||||
return
|
|
||||||
|
|
||||||
if(!ishuman(src))
|
if(!ishuman(src))
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
var/mob/living/carbon/human/M = src
|
var/mob/living/carbon/human/M = src
|
||||||
|
|
||||||
|
if(istype(M.wear_suit, armor_type) || istype(M.head, helmet_type) || istype(M.shoes, boot_type))
|
||||||
|
chem_cost = 0
|
||||||
|
|
||||||
|
var/datum/changeling/changeling = changeling_power(chem_cost, 1, 100, CONSCIOUS)
|
||||||
|
|
||||||
|
if(!changeling)
|
||||||
|
return
|
||||||
|
|
||||||
//First, check if we're already wearing the armor, and if so, take it off.
|
//First, check if we're already wearing the armor, and if so, take it off.
|
||||||
if(istype(M.wear_suit, armor_type) || istype(M.head, helmet_type) || istype(M.shoes, boot_type))
|
if(istype(M.wear_suit, armor_type) || istype(M.head, helmet_type) || istype(M.shoes, boot_type))
|
||||||
M.visible_message("<span class='warning'>[M] casts off their [M.wear_suit.name]!</span>",
|
M.visible_message("<span class='warning'>[M] casts off their [M.wear_suit.name]!</span>",
|
||||||
@@ -39,7 +44,7 @@
|
|||||||
var/obj/item/clothing/shoes/B = new boot_type(src)
|
var/obj/item/clothing/shoes/B = new boot_type(src)
|
||||||
src.equip_to_slot_or_del(B, slot_shoes)
|
src.equip_to_slot_or_del(B, slot_shoes)
|
||||||
|
|
||||||
src.mind.changeling.chem_charges -= 20
|
src.mind.changeling.chem_charges -= chem_cost
|
||||||
playsound(src, 'sound/effects/blobattack.ogg', 30, 1)
|
playsound(src, 'sound/effects/blobattack.ogg', 30, 1)
|
||||||
M.update_inv_wear_suit()
|
M.update_inv_wear_suit()
|
||||||
M.update_inv_head()
|
M.update_inv_head()
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
/mob/proc/changeling_spacesuit()
|
/mob/proc/changeling_spacesuit()
|
||||||
set category = "Changeling"
|
set category = "Changeling"
|
||||||
set name = "Organic Space Suit (20)"
|
set name = "Organic Space Suit (20)"
|
||||||
if(changeling_generic_armor(/obj/item/clothing/suit/space/changeling,/obj/item/clothing/head/helmet/space/changeling,/obj/item/clothing/shoes/magboots/changeling))
|
if(changeling_generic_armor(/obj/item/clothing/suit/space/changeling,/obj/item/clothing/head/helmet/space/changeling,/obj/item/clothing/shoes/magboots/changeling, 20))
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
set category = "Changeling"
|
set category = "Changeling"
|
||||||
set name = "Organic Spacearmor (20)"
|
set name = "Organic Spacearmor (20)"
|
||||||
|
|
||||||
if(changeling_generic_armor(/obj/item/clothing/suit/space/changeling/armored,/obj/item/clothing/head/helmet/space/changeling/armored,/obj/item/clothing/shoes/magboots/changeling/armored))
|
if(changeling_generic_armor(/obj/item/clothing/suit/space/changeling/armored,/obj/item/clothing/head/helmet/space/changeling/armored,/obj/item/clothing/shoes/magboots/changeling/armored, 20))
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user