diff --git a/code/modules/mining/equipment/kinetic_crusher.dm b/code/modules/mining/equipment/kinetic_crusher.dm index bee64aa4256..7620fee18d1 100644 --- a/code/modules/mining/equipment/kinetic_crusher.dm +++ b/code/modules/mining/equipment/kinetic_crusher.dm @@ -32,6 +32,10 @@ /// Tracker for the current amount of force used when the item is wielded. /// Note that this isn't wired to anything, and must be updated with AddComponent to have value. var/force_wielded = 20 + /// The file in which our projectile icon resides + var/projectile_icon = 'icons/obj/projectiles.dmi' + /// Used by retool kits when changing the crusher's projectile sprite + var/projectile_icon_state = "pulse1" /obj/item/kinetic_crusher/Initialize(mapload) . = ..() @@ -119,6 +123,8 @@ if(!isturf(proj_turf)) return var/obj/projectile/destabilizer/D = new /obj/projectile/destabilizer(proj_turf) + D.icon = projectile_icon + D.icon_state = projectile_icon_state for(var/t in trophies) var/obj/item/crusher_trophy/T = t T.on_projectile_fire(D, user) @@ -186,7 +192,7 @@ visible_message("[src]'s light fades and turns off.") /obj/item/kinetic_crusher/update_icon_state() - inhand_icon_state = "crusher[HAS_TRAIT(src, TRAIT_WIELDED)]" + inhand_icon_state = "[icon_state][HAS_TRAIT(src, TRAIT_WIELDED)]" /obj/item/kinetic_crusher/update_overlays() . = ..() diff --git a/code/modules/mining/equipment/kinetic_crusher_cosmetics.dm b/code/modules/mining/equipment/kinetic_crusher_cosmetics.dm new file mode 100644 index 00000000000..49a2e1a85d2 --- /dev/null +++ b/code/modules/mining/equipment/kinetic_crusher_cosmetics.dm @@ -0,0 +1,150 @@ +/// Cosmetic items for changing the crusher's look +/obj/item/crusher_trophy/retool_kit + name = "crusher retool kit" + desc = "A toolkit for changing the crusher's appearance without affecting the device's function." + icon = 'icons/obj/mining.dmi' + icon_state = "retool_kit" + denied_type = /obj/item/crusher_trophy/retool_kit + + /// The crusher reskin + var/datum/crusher_skin/active_skin + +/obj/item/crusher_trophy/retool_kit/Destroy(force) + if(istype(active_skin)) + QDEL_NULL(active_skin) + return ..() + +/obj/item/crusher_trophy/retool_kit/effect_desc() + return "the crusher to have the appearance of \a [active_skin::name]" + +/obj/item/crusher_trophy/retool_kit/add_to(obj/item/kinetic_crusher/pkc, mob/user) + . = ..() + if(!.) + return + active_skin = new active_skin(pkc) + if(active_skin.retool_icon) + pkc.icon = active_skin.retool_icon + pkc.icon_state = active_skin.retool_icon_state + pkc.inhand_icon_state = active_skin.retool_inhand_icon + if(active_skin.retool_projectile_icon) + pkc.projectile_icon = active_skin.retool_projectile_icon + if(active_skin.retool_projectile_icon_state) + pkc.projectile_icon_state = active_skin.retool_projectile_icon_state + // Should either have both, or neither + if(active_skin.retool_lefthand_file) + pkc.lefthand_file = active_skin.retool_lefthand_file + pkc.righthand_file = active_skin.retool_righthand_file + if(active_skin.retool_worn_file) + pkc.worn_icon = active_skin.retool_worn_file + pkc.worn_icon_state = active_skin::retool_icon_state + if(active_skin.retool_inhand_x) + pkc.inhand_x_dimension = active_skin.retool_inhand_x + if(active_skin.retool_inhand_y) + pkc.inhand_y_dimension = active_skin.retool_inhand_y + pkc.update_appearance() + pkc.update_slot_icon() + +/obj/item/crusher_trophy/retool_kit/remove_from(obj/item/kinetic_crusher/pkc) + var/skin_type = active_skin.type + qdel(active_skin) + active_skin = skin_type + pkc.icon = initial(pkc.icon) + pkc.icon_state = initial(pkc.icon_state) + pkc.inhand_icon_state = initial(pkc.inhand_icon_state) + pkc.projectile_icon = initial(pkc.projectile_icon) + pkc.projectile_icon_state = initial(pkc.projectile_icon_state) + pkc.lefthand_file = initial(pkc.lefthand_file) + pkc.righthand_file = initial(pkc.righthand_file) + pkc.worn_icon = initial(pkc.worn_icon) + pkc.worn_icon_state = initial(pkc.worn_icon_state) + pkc.inhand_x_dimension = initial(pkc.inhand_x_dimension) + pkc.inhand_y_dimension = initial(pkc.inhand_y_dimension) + pkc.update_appearance() + pkc.update_slot_icon() + return ..() + +/obj/item/crusher_trophy/retool_kit/sword + name = "crusher sword retool kit" + desc = "A kit containing all the tools you need to reconfigure your crusher into a sword." + active_skin = /datum/crusher_skin/sword + +/obj/item/crusher_trophy/retool_kit/harpoon + name = "crusher harpoon retool kit" + desc = "A kit containing all the tools you need to reconfigure your crusher into a harpoon." + active_skin = /datum/crusher_skin/harpoon + +/obj/item/crusher_trophy/retool_kit/glaive + name = "crusher glaive retool kit" + desc = "A kit containing all the tools you need to reconfigure your crusher into a glaive." + active_skin = /datum/crusher_skin/glaive + +/obj/item/crusher_trophy/retool_kit/dagger + name = "crusher dagger retool kit" + desc = "A kit containing all the tools you need to reconfigure your crusher into a dagger and blaster." + active_skin = /datum/crusher_skin/dagger + +/obj/item/crusher_trophy/retool_kit/ashenskull + name = "ashen skull" + desc = "It burns with the flame of the necropolis, whispering in your ear. It demands to be bound to a suitable weapon." + icon_state = "retool_kit_skull" + active_skin = /datum/crusher_skin/ashen_skull + +/// Alternate PKC skins +/datum/crusher_skin + /// Name of the modification + var/name = "error that should be reported to coders" + /// Specifies the icon file in which the crusher's new state is stored. + var/retool_icon = 'icons/obj/mining.dmi' + /// Specifies the sprite/icon state which the crusher is changed to as an item. Should appear in the icons/obj/mining.dmi file with accompanying "lit" and "recharging" sprites + var/retool_icon_state = "ipickaxe" + /// Specifies the icon state for the crusher's appearance in hand. Should appear in both retool_lefthand_file and retool_righthand_file. + var/retool_inhand_icon = "ipickaxe" + /// Specifies the icon file in which the crusher's projectile sprite is located. + var/retool_projectile_icon = 'icons/obj/projectiles.dmi' + /// For if the retool kit changes the projectile's appearance. + var/retool_projectile_icon_state = null + /// Specifies the left hand inhand icon file. Don't forget to set the right hand file as well. + var/retool_lefthand_file = null + /// Specifies the right hand inhand icon file. Don't forget to set the left hand file as well. + var/retool_righthand_file = null + /// Specifies the worn icon file. + var/retool_worn_file = null + /// Specifies the X dimensions of the new inhand, only relevant with different inhand files. + var/retool_inhand_x = null + /// Specifies the Y dimensions of the new inhand, only relevant with different inhand files. + var/retool_inhand_y = null + /// Can this skin be normally selected by a generic retool kit? + var/normal_skin = TRUE + /// Crusher this skin is attached to + var/obj/item/kinetic_crusher/crusher + +/datum/crusher_skin/sword + name = "sword" + retool_icon_state = "crusher_sword" + retool_inhand_icon = "crusher_sword" + +/datum/crusher_skin/harpoon + name = "harpoon" + retool_icon_state = "crusher_harpoon" + retool_inhand_icon = "crusher_harpoon" + retool_projectile_icon_state = "pulse_harpoon" + +/datum/crusher_skin/dagger + name = "dual dagger and blaster" + retool_icon_state = "crusher_dagger" + retool_inhand_icon = "crusher_dagger" + +/datum/crusher_skin/glaive + name = "glaive" + retool_icon_state = "crusher_glaive" + retool_inhand_icon = "crusher_glaive" + retool_lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi' + retool_righthand_file = 'icons/mob/inhands/64x64_righthand.dmi' + retool_inhand_x = 64 + retool_inhand_y = 64 + +/datum/crusher_skin/ashen_skull + retool_icon_state = "crusher_skull" + retool_inhand_icon = "crusher_skull" + retool_projectile_icon_state = "pulse_skull" + normal_skin = FALSE diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm index 6790aff99ba..84c09079150 100644 --- a/code/modules/mining/machine_vending.dm +++ b/code/modules/mining/machine_vending.dm @@ -69,6 +69,10 @@ EQUIPMENT("KA Range Increase", /obj/item/borg/upgrade/modkit/range, 1000), EQUIPMENT("KA Super Chassis", /obj/item/borg/upgrade/modkit/chassis_mod, 250), EQUIPMENT("KA White Tracer Rounds", /obj/item/borg/upgrade/modkit/tracer, 100), + EQUIPMENT("Crusher Retool Kit: Sword", /obj/item/crusher_trophy/retool_kit/sword, 250), + EQUIPMENT("Crusher Retool Kit: Harpoon", /obj/item/crusher_trophy/retool_kit/harpoon, 250), + EQUIPMENT("Crusher Retool Kit: Glaive", /obj/item/crusher_trophy/retool_kit/glaive, 250), + EQUIPMENT("Crusher Retool Kit: Dagger and Blaster", /obj/item/crusher_trophy/retool_kit/dagger, 250), ) prize_list["Digging Tools"] = list( EQUIPMENT("Silver Pickaxe", /obj/item/pickaxe/silver, 1000), diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm index 491e6dcdab8..502c5e0a014 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm @@ -45,7 +45,7 @@ Difficulty: Medium score_type = LEGION_SCORE loot = list(/obj/item/storm_staff) difficulty_ore_modifier = 3 - crusher_loot = list(/obj/item/crusher_trophy/empowered_legion_skull) + crusher_loot = list(/obj/item/crusher_trophy/empowered_legion_skull, /obj/item/crusher_trophy/retool_kit/ashenskull) enraged_loot = /obj/item/disk/fauna_research/legion vision_range = 13 elimination = TRUE diff --git a/icons/mob/inhands/64x64_lefthand.dmi b/icons/mob/inhands/64x64_lefthand.dmi index b63746a56d4..c4f43e3b770 100644 Binary files a/icons/mob/inhands/64x64_lefthand.dmi and b/icons/mob/inhands/64x64_lefthand.dmi differ diff --git a/icons/mob/inhands/64x64_righthand.dmi b/icons/mob/inhands/64x64_righthand.dmi index 9ca8da5d1a4..19f7db93643 100644 Binary files a/icons/mob/inhands/64x64_righthand.dmi and b/icons/mob/inhands/64x64_righthand.dmi differ diff --git a/icons/mob/inhands/weapons_lefthand.dmi b/icons/mob/inhands/weapons_lefthand.dmi index 13d742e454c..d887ec95f40 100644 Binary files a/icons/mob/inhands/weapons_lefthand.dmi and b/icons/mob/inhands/weapons_lefthand.dmi differ diff --git a/icons/mob/inhands/weapons_righthand.dmi b/icons/mob/inhands/weapons_righthand.dmi index 63519bf308c..e06e87e200c 100644 Binary files a/icons/mob/inhands/weapons_righthand.dmi and b/icons/mob/inhands/weapons_righthand.dmi differ diff --git a/icons/obj/mining.dmi b/icons/obj/mining.dmi index 291656593e7..f11dcd5aebc 100644 Binary files a/icons/obj/mining.dmi and b/icons/obj/mining.dmi differ diff --git a/icons/obj/projectiles.dmi b/icons/obj/projectiles.dmi index 1af6da1448f..3149a55ae33 100644 Binary files a/icons/obj/projectiles.dmi and b/icons/obj/projectiles.dmi differ diff --git a/paradise.dme b/paradise.dme index f73bd7ae26c..5401a014f2d 100644 --- a/paradise.dme +++ b/paradise.dme @@ -2395,6 +2395,7 @@ #include "code\modules\mining\equipment\explorer_gear.dm" #include "code\modules\mining\equipment\hardmode_grenade.dm" #include "code\modules\mining\equipment\kinetic_crusher.dm" +#include "code\modules\mining\equipment\kinetic_crusher_cosmetics.dm" #include "code\modules\mining\equipment\lazarus_injector.dm" #include "code\modules\mining\equipment\marker_beacons.dm" #include "code\modules\mining\equipment\mineral_scanner.dm"