diff --git a/code/__DEFINES/mecha_hides.dm b/code/__DEFINES/mecha_hides.dm new file mode 100644 index 00000000000..3c1c1496a54 --- /dev/null +++ b/code/__DEFINES/mecha_hides.dm @@ -0,0 +1,6 @@ +#define HIDES_COVERED_FULL 3 +#define PLATES_COVERED_FULL 3 + +#define DRAKE_HIDES_COVERED_SLIGHT 1 +#define DRAKE_HIDES_COVERED_MODERATE 2 +#define DRAKE_HIDES_COVERED_FULL 3 diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index 29124ecc503..0d48b4f514e 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -339,8 +339,6 @@ ~~~~~~~~~~~~~~~~~~~~~*/ /obj/mecha/proc/diag_hud_set_mechhealth() var/image/holder = hud_list[DIAG_MECH_HUD] - var/icon/I = icon(icon, icon_state, dir) - holder.pixel_y = I.Height() - world.icon_size holder.icon_state = "huddiag[RoundDiagBar(obj_integrity/max_integrity)]" /obj/mecha/proc/diag_hud_set_mechcell() diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index 93332e05f69..c1d333e8c4a 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -16,8 +16,16 @@ wreckage = /obj/structure/mecha_wreckage/ripley var/list/cargo = new var/cargo_capacity = 15 + + /// How many goliath hides does the Ripley have? Does not stack with other armor var/hides = 0 + /// How many drake hides does the Ripley have? Does not stack with other armor + var/drake_hides = 0 + + /// How many plates does the Ripley have? Does not stack with other armor + var/plates = 0 + /obj/mecha/working/ripley/Move() . = ..() if(.) @@ -33,10 +41,14 @@ ore.forceMove(ore_box) /obj/mecha/working/ripley/Destroy() - for(var/i=1, i <= hides, i++) - new /obj/item/stack/sheet/animalhide/goliath_hide(loc) //If a goliath-plated ripley gets killed, all the plates drop + for(var/i in 1 to hides) + new /obj/item/stack/sheet/animalhide/goliath_hide(get_turf(src)) //If a armor-plated ripley gets killed, all the armor drop + for(var/i in 1 to plates) + new /obj/item/stack/sheet/animalhide/armor_plate(get_turf(src)) + for(var/i in 1 to drake_hides) + new /obj/item/stack/sheet/animalhide/ashdrake(get_turf(src)) for(var/atom/movable/A in cargo) - A.forceMove(loc) + A.forceMove(get_turf(src)) step_rand(A) cargo.Cut() return ..() @@ -55,22 +67,58 @@ /obj/mecha/working/ripley/update_desc() . = ..() - if(!hides) // Just in case if hides are somehow removed + if(!hides && !plates && !drake_hides) // Just in case if armor is removed desc = initial(desc) return - if(hides == 3) - desc = "Autonomous Power Loader Unit. It's wearing a fearsome carapace entirely composed of goliath hide plates - its pilot must be an experienced monster hunter." - else - desc = "Autonomous Power Loader Unit. Its armour is enhanced with some goliath hide plates." + + // Goliath hides + if(hides) + if(hides == HIDES_COVERED_FULL) + desc = "Autonomous Power Loader Unit. It's wearing a fearsome carapace entirely composed of goliath hide plates - its pilot must be an experienced monster hunter." + else + desc = "Autonomous Power Loader Unit. Its armour is enhanced with some goliath hide plates." + return + + // Metal plates + if(plates) + if(plates == PLATES_COVERED_FULL) + desc = "Autonomous Power Loader Unit. Its armor is completely lined with metal plating." + else + desc = "Autonomous Power Loader Unit. Its armor is reinforced with some metal plating." + return + + // Drake hides + if(drake_hides) + if(drake_hides == DRAKE_HIDES_COVERED_FULL) + desc = "Autonomous Power Loader Unit. Its every corner is covered in ancient hide, creating a powerful shield. The pilot of this exosuit must be prepared for battles on the level of legend." + if(drake_hides == DRAKE_HIDES_COVERED_MODERATE) + desc = "Autonomous Power Loader Unit. Its armor is adorned with dragon hide plates, instilling fear in its enemies and guarding its pilot." + if(drake_hides == DRAKE_HIDES_COVERED_SLIGHT) + desc = "Autonomous Power Loader Unit. The armor of this exosuit only touches the mythical: a few plates of dragon hide adorn its plating like rare warrior trophies." + return /obj/mecha/working/ripley/update_overlays() . = ..() - if(!hides) - return - if(hides == 3) - . += occupant ? "ripley-g-full" : "ripley-g-full-open" - else - . += occupant ? "ripley-g" : "ripley-g-open" +// hides + if(hides) + if(hides == HIDES_COVERED_FULL) + . += occupant ? "ripley-g-full" : "ripley-g-full-open" + else + . += occupant ? "ripley-g" : "ripley-g-open" +//plates + if(plates) + if(plates == PLATES_COVERED_FULL) + . += occupant ? "ripley-m-full" : "ripley-m-full-open" + else + . += occupant ? "ripley-m" : "ripley-m-open" +//drake hides + if(drake_hides) + if(drake_hides == DRAKE_HIDES_COVERED_FULL) + . += occupant ? "ripley-d-full" : "ripley-d-full-open" + else if(drake_hides == DRAKE_HIDES_COVERED_MODERATE) + . += occupant ? "ripley-d-2" : "ripley-d-2-open" + else if(drake_hides == DRAKE_HIDES_COVERED_SLIGHT) + . += occupant ? "ripley-d" : "ripley-d-open" /obj/mecha/working/ripley/firefighter desc = "A standard APLU chassis that was refitted with additional thermal protection and a cistern." diff --git a/code/game/mecha/working/working.dm b/code/game/mecha/working/working.dm index 3e45148ef51..c9e7d99ac08 100644 --- a/code/game/mecha/working/working.dm +++ b/code/game/mecha/working/working.dm @@ -1,2 +1,3 @@ /obj/mecha/working internal_damage_threshold = 60 + diff --git a/code/game/objects/items/stacks/sheets/leather.dm b/code/game/objects/items/stacks/sheets/leather.dm index f91e4b8d75b..266974088d2 100644 --- a/code/game/objects/items/stacks/sheets/leather.dm +++ b/code/game/objects/items/stacks/sheets/leather.dm @@ -178,7 +178,7 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( /obj/item/stack/sheet/animalhide/goliath_hide name = "goliath hide plates" - desc = "Pieces of a goliath's rocky hide, these might be able to make your suit a bit more durable to attack from the local fauna." + desc = "Pieces of a goliath's rocky hide, these might be able to make your miner equipment such as suits, plasmaman helmets, borgs and Ripley class exosuits a bit more durable to attack from the local fauna." icon = 'icons/obj/stacks/organic.dmi' icon_state = "goliath_hide" item_state = "goliath_hide" @@ -198,41 +198,80 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( if(is_type_in_typecache(target, goliath_platable_armor_typecache)) var/obj/item/clothing/C = target 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)) + if(current_armor.getRating(MELEE) < 75) + if(!use(1)) + to_chat(user, "You dont have enough [src] for this!") + return + C.armor = current_armor.setRating(melee_value = min(current_armor.getRating(MELEE) + 15, 75)) to_chat(user, "You strengthen [target], improving its resistance against melee attacks.") use(1) else to_chat(user, "You can't improve [C] any further!") else if(istype(target, /obj/mecha/working/ripley)) var/obj/mecha/working/ripley/D = target - if(D.hides < 3) + if(D.hides < HIDES_COVERED_FULL && !D.plates && !D.drake_hides) + if(!use(1)) + to_chat(user, "You dont have enough [src] for this!") + return D.hides++ - 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, "You strengthen [target], improving its resistance against melee attacks.") + D.armor = D.armor.setRating(melee_value = min(D.armor.getRating(MELEE) + 25, 115)) + D.armor = D.armor.setRating(bullet_value = min(D.armor.getRating(BULLET) + 7, 60)) + D.armor = D.armor.setRating(laser_value = min(D.armor.getRating(LASER) + 7, 60)) + to_chat(user, "You strengthen [target], improving its resistance against attacks.") D.update_appearance(UPDATE_DESC|UPDATE_OVERLAYS) - use(1) else to_chat(user, "You can't improve [D] any further!") else if(isrobot(target)) var/mob/living/silicon/robot/R = target if(istype(R.module, /obj/item/robot_module/miner)) var/datum/armor/current_armor = R.armor - if(current_armor.getRating(MELEE) < 60) - R.armor = current_armor.setRating(melee_value = min(current_armor.getRating(MELEE) + 10, 60)) + if(current_armor.getRating(MELEE) < 75) + if(!use(1)) + to_chat(user, "You dont have enough [src] for this!") + return + R.armor = current_armor.setRating(melee_value = min(current_armor.getRating(MELEE) + 15, 75)) to_chat(user, "You strengthen [target], improving its resistance against melee attacks.") - use(1) else to_chat(user, "You can't improve [R] any further!") else to_chat(user, "[R]'s armor can not be improved!") +/obj/item/stack/sheet/animalhide/armor_plate + name = "armor plate" + desc = "This piece of metal can be attached to the mech itself, enhancing its protective characteristics. Unfortunately, only working class exosuits have notches for such armor." + icon = 'icons/mecha/mecha_equipment.dmi' + icon_state = "armor_plate" + item_state = "armor_plate" + singular_name = "armor plate" + flags = NOBLUDGEON + w_class = WEIGHT_CLASS_NORMAL + layer = MOB_LAYER + +/obj/item/stack/sheet/animalhide/armor_plate/afterattack(atom/target, mob/user, proximity_flag) + if(!proximity_flag) + return + if(istype(target, /obj/mecha/working/ripley)) + var/obj/mecha/working/ripley/D = target + if(D.plates < PLATES_COVERED_FULL && !D.hides && !D.drake_hides) + if(!use(1)) + to_chat(user, "You dont have enough [src] for this!") + return + use(1) + D.plates++ + 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) + 4, 50)) + D.armor = D.armor.setRating(laser_value = min(D.armor.getRating(LASER) + 4, 50)) + to_chat(user, "You strengthen [target], improving its resistance against attacks.") + D.update_appearance(UPDATE_DESC|UPDATE_OVERLAYS) + else + to_chat(user, "You can't improve [D] any further!") + +/obj/item/stack/sheet/animalhide/armor_plate/attackby(obj/item/W, mob/user, params) + return // no steel leather for ya /obj/item/stack/sheet/animalhide/ashdrake name = "ash drake hide" - desc = "The strong, scaled hide of an ash drake." + desc = "The strong, scaled hide of an ash drake. Can be attached to the mech itself, greatly enhancing its protective characteristics. Unfortunately, only working class exosuits have notches for such armor." icon = 'icons/obj/stacks/organic.dmi' icon_state = "dragon_hide" item_state = "dragon_hide" @@ -242,9 +281,30 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( layer = MOB_LAYER dynamic_icon_state = TRUE +/obj/item/stack/sheet/animalhide/ashdrake/afterattack(atom/target, mob/user, proximity_flag) + if(!proximity_flag) + return + if(istype(target, /obj/mecha/working/ripley)) + var/obj/mecha/working/ripley/D = target + if(D.drake_hides < DRAKE_HIDES_COVERED_FULL && !D.hides && !D.plates) + if(!use(1)) + to_chat(user, "You dont have enough [src] for this!") + return + use(1) + D.drake_hides++ + D.max_integrity += 50 + D.obj_integrity += 50 + D.armor = D.armor.setRating(melee_value = min(D.armor.getRating(MELEE) + 45, 175)) // 77.7% melee armor maximum + D.armor = D.armor.setRating(bullet_value = min(D.armor.getRating(BULLET) + 7, 60)) + D.armor = D.armor.setRating(laser_value = min(D.armor.getRating(LASER) + 7, 60)) + to_chat(user, "You strengthen [target], improving its resistance against attacks.") + D.update_appearance(UPDATE_DESC|UPDATE_OVERLAYS) + else + to_chat(user, "You can't improve [D] any further!") + //Step one - dehairing. -/obj/item/stack/sheet/animalhide/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/stack/sheet/animalhide/attackby(obj/item/W, mob/user, params) if(W.sharp) user.visible_message("[user] starts cutting hair off \the [src].", "You start cutting the hair off \the [src]...", "You hear the sound of a knife rubbing against flesh.") if(do_after(user, 50 * W.toolspeed, target = src)) diff --git a/code/modules/research/designs/mechfabricator_designs.dm b/code/modules/research/designs/mechfabricator_designs.dm index e99af455881..19fc6461988 100644 --- a/code/modules/research/designs/mechfabricator_designs.dm +++ b/code/modules/research/designs/mechfabricator_designs.dm @@ -793,18 +793,18 @@ category = list("Exosuit Equipment") /datum/design/mech_ccw_armor - name = "Exosuit Module (Reactive Armor Booster Module)" + name = "Exosuit Module (Melee Armor Booster Module)" desc = "Exosuit-mounted armor booster." id = "mech_ccw_armor" build_type = MECHFAB - req_tech = list("materials" = 5, "combat" = 4) + req_tech = list("materials" = 5, "combat" = 5, "engineering"=3) build_path = /obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster materials = list(MAT_METAL=20000,MAT_SILVER=5000) construction_time = 10 SECONDS category = list("Exosuit Equipment") /datum/design/mech_proj_armor - name = "Exosuit Module (Reflective Armor Booster Module)" + name = "Exosuit Module (Ranged Armor Booster Module)" desc = "Exosuit-mounted armor booster." id = "mech_proj_armor" build_type = MECHFAB @@ -814,6 +814,17 @@ construction_time = 10 SECONDS category = list("Exosuit Equipment") +/datum/design/mech_armor_plate + name = "Exosuit Mining Armor Plate" + desc = "This piece of metal can be attached to the mech itself, enhancing its protective characteristics. Unfortunately, only working class exosuits have notches for such armor." + id = "mech_plate_armor" + build_type = MECHFAB + req_tech = list("materials" = 5, "combat" = 5, "engineering" = 3) + build_path = /obj/item/stack/sheet/animalhide/armor_plate + materials = list(MAT_METAL = 20000, MAT_TITANIUM = 5000) + construction_time = 10 SECONDS + category = list("Exosuit Equipment") + /datum/design/mech_repair_droid name = "Exosuit Module (Repair Droid Module)" desc = "Automated Repair Droid. BEEP BOOP" diff --git a/icons/mecha/mecha.dmi b/icons/mecha/mecha.dmi index 9d5db73c394..6c058ef9416 100644 Binary files a/icons/mecha/mecha.dmi and b/icons/mecha/mecha.dmi differ diff --git a/icons/mecha/mecha_equipment.dmi b/icons/mecha/mecha_equipment.dmi index f8626a6d6bb..d0d67fc81ae 100644 Binary files a/icons/mecha/mecha_equipment.dmi and b/icons/mecha/mecha_equipment.dmi differ diff --git a/paradise.dme b/paradise.dme index 644cbdc20a6..833281129d1 100644 --- a/paradise.dme +++ b/paradise.dme @@ -84,6 +84,7 @@ #include "code\__DEFINES\martial_arts.dm" #include "code\__DEFINES\MC.dm" #include "code\__DEFINES\mecha_defines.dm" +#include "code\__DEFINES\mecha_hides.dm" #include "code\__DEFINES\medal.dm" #include "code\__DEFINES\misc_defines.dm" #include "code\__DEFINES\mob_defines.dm"