mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Actually plug armor procs to armor modification code
This commit is contained in:
@@ -169,9 +169,9 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \
|
||||
return
|
||||
if(is_type_in_typecache(target, goliath_platable_armor_typecache))
|
||||
var/obj/item/clothing/C = target
|
||||
var/list/current_armor = C.armor
|
||||
if(current_armor["melee"] < 60)
|
||||
current_armor["melee"] = min(current_armor["melee"] + 10, 60)
|
||||
var/datum/armor/current_armor = C.armor
|
||||
if(current_armor.getRating("melee") < 60)
|
||||
C.armor = current_armor.setRating(melee_value = min(current_armor.getRating("melee") + 10, 60))
|
||||
to_chat(user, "<span class='info'>You strengthen [target], improving its resistance against melee attacks.</span>")
|
||||
use(1)
|
||||
else
|
||||
@@ -180,9 +180,9 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \
|
||||
var/obj/mecha/working/ripley/D = target
|
||||
if(D.hides < 3)
|
||||
D.hides++
|
||||
D.armor["melee"] = min(D.armor["melee"] + 10, 70)
|
||||
D.armor["bullet"] = min(D.armor["bullet"] + 5, 50)
|
||||
D.armor["laser"] = min(D.armor["laser"] + 5, 50)
|
||||
D.armor = D.armor.setRating(melee_value = min(D.armor.getRating("melee") + 10, 70))
|
||||
D.armor = D.armor.setRating(bullet_value = min(D.armor.getRating("bullet") + 5, 50))
|
||||
D.armor = D.armor.setRating(laser_value = min(D.armor.getRating("laser") + 5, 50))
|
||||
to_chat(user, "<span class='info'>You strengthen [target], improving its resistance against melee attacks.</span>")
|
||||
D.update_icon()
|
||||
if(D.hides == 3)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
return 0
|
||||
var/armor_protection = 0
|
||||
if(damage_flag)
|
||||
armor_protection = armor[damage_flag]
|
||||
armor_protection = armor.getRating(damage_flag)
|
||||
if(armor_protection) //Only apply weak-against-armor/hollowpoint effects if there actually IS armor.
|
||||
armor_protection = Clamp(armor_protection - armour_penetration, min(armor_protection, 0), 100)
|
||||
return round(damage_amount * (100 - armor_protection)*0.01, DAMAGE_PRECISION)
|
||||
|
||||
@@ -43,11 +43,11 @@
|
||||
|
||||
/obj/Initialize(mapload)
|
||||
. = ..()
|
||||
if (islist(armor))
|
||||
if(islist(armor))
|
||||
armor = getArmor(arglist(armor))
|
||||
else if (!armor)
|
||||
else if(!armor)
|
||||
armor = getArmor()
|
||||
else if (!istype(armor, /datum/armor))
|
||||
else if(!istype(armor, /datum/armor))
|
||||
stack_trace("Invalid type [armor.type] found in .armor during /obj Initialize()")
|
||||
|
||||
/obj/Topic(href, href_list, nowindow = FALSE, datum/topic_state/state = GLOB.default_state)
|
||||
@@ -197,7 +197,7 @@
|
||||
/obj/proc/multitool_menu(mob/user, obj/item/multitool/P)
|
||||
return "<b>NO MULTITOOL_MENU!</b>"
|
||||
|
||||
/obj/proc/linkWith(mob/user, obj/buffer, var/context)
|
||||
/obj/proc/linkWith(mob/user, obj/buffer, context)
|
||||
return FALSE
|
||||
|
||||
/obj/proc/unlinkFrom(mob/user, obj/buffer)
|
||||
|
||||
Reference in New Issue
Block a user