mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
Adds retool kits, a series of cosmetics for the protokinetic crusher (#87252)
# Conflicts: # code/modules/mining/equipment/kinetic_crusher.dm # icons/obj/weapons/guns/projectiles.dmi
This commit is contained in:
committed by
lessthanthree
parent
74817cb491
commit
323f4f20e1
@@ -41,6 +41,8 @@
|
||||
var/charge_time = 1.5 SECONDS
|
||||
var/detonation_damage = 50
|
||||
var/backstab_bonus = 30
|
||||
var/current_inhand_icon_state = "crusher" //variable used by retool kits when changing the crusher's appearance
|
||||
var/projectile_icon = "pulse1" //variable used by retool kits when changing the crusher's projectile sprite
|
||||
|
||||
/obj/item/kinetic_crusher/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -154,6 +156,7 @@
|
||||
if(!isturf(proj_turf))
|
||||
return
|
||||
var/obj/projectile/destabilizer/destabilizer = new(proj_turf)
|
||||
destabilizer.icon_state = "[projectile_icon]"
|
||||
for(var/obj/item/crusher_trophy/attached_trophy as anything in trophies)
|
||||
attached_trophy.on_projectile_fire(destabilizer, user)
|
||||
destabilizer.preparePixelProjectile(target, user, modifiers)
|
||||
@@ -182,7 +185,7 @@
|
||||
return TRUE
|
||||
|
||||
/obj/item/kinetic_crusher/update_icon_state()
|
||||
inhand_icon_state = "crusher[HAS_TRAIT(src, TRAIT_WIELDED)]" // this is not icon_state and not supported by 2hcomponent
|
||||
inhand_icon_state = "[current_inhand_icon_state][HAS_TRAIT(src, TRAIT_WIELDED)]" // this is not icon_state and not supported by 2hcomponent
|
||||
return ..()
|
||||
|
||||
/obj/item/kinetic_crusher/update_overlays()
|
||||
@@ -199,7 +202,6 @@
|
||||
//destablizing force
|
||||
/obj/projectile/destabilizer
|
||||
name = "destabilizing force"
|
||||
icon_state = "pulse1"
|
||||
damage = 0 //We're just here to mark people. This is still a melee weapon.
|
||||
damage_type = BRUTE
|
||||
armor_flag = BOMB
|
||||
@@ -335,15 +337,15 @@
|
||||
|
||||
//SKYRAT EDIT START - OVERRIDEN IN modular_skyrat/master_files/code/modules/mining/equipment/kinetic_crusher.dm
|
||||
/*
|
||||
/obj/item/crusher_trophy/legion_skull/add_to(obj/item/kinetic_crusher/H, mob/living/user)
|
||||
/obj/item/crusher_trophy/legion_skull/add_to(obj/item/kinetic_crusher/pkc, mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
H.charge_time -= bonus_value
|
||||
pkc.charge_time -= bonus_value
|
||||
|
||||
/obj/item/crusher_trophy/legion_skull/remove_from(obj/item/kinetic_crusher/H, mob/living/user)
|
||||
/obj/item/crusher_trophy/legion_skull/remove_from(obj/item/kinetic_crusher/pkc, mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
H.charge_time += bonus_value
|
||||
pkc.charge_time += bonus_value
|
||||
*/
|
||||
//SKYRAT EDIT END
|
||||
|
||||
@@ -398,18 +400,18 @@
|
||||
|
||||
//SKYRAT EDIT START - OVERRIDEN IN modular_skyrat/master_files/code/modules/mining/equipment/kinetic_crusher.dm
|
||||
/*
|
||||
/obj/item/crusher_trophy/demon_claws/add_to(obj/item/kinetic_crusher/H, mob/living/user)
|
||||
/obj/item/crusher_trophy/demon_claws/add_to(obj/item/kinetic_crusher/pkc, mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
H.force += bonus_value * 0.2
|
||||
H.detonation_damage += bonus_value * 0.8
|
||||
pkc.force += bonus_value * 0.2
|
||||
pkc.detonation_damage += bonus_value * 0.8
|
||||
AddComponent(/datum/component/two_handed, force_wielded=(20 + bonus_value * 0.2))
|
||||
|
||||
/obj/item/crusher_trophy/demon_claws/remove_from(obj/item/kinetic_crusher/H, mob/living/user)
|
||||
/obj/item/crusher_trophy/demon_claws/remove_from(obj/item/kinetic_crusher/pkc, mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
H.force -= bonus_value * 0.2
|
||||
H.detonation_damage -= bonus_value * 0.8
|
||||
pkc.force -= bonus_value * 0.2
|
||||
pkc.detonation_damage -= bonus_value * 0.8
|
||||
AddComponent(/datum/component/two_handed, force_wielded=20)
|
||||
*/
|
||||
//SKYRAT EDIT END
|
||||
@@ -511,3 +513,80 @@
|
||||
|
||||
/obj/item/crusher_trophy/wolf_ear/on_mark_detonation(mob/living/target, mob/living/user)
|
||||
user.apply_status_effect(/datum/status_effect/speed_boost, 1 SECONDS)
|
||||
|
||||
//cosmetic items for changing the crusher's look
|
||||
|
||||
/obj/item/crusher_trophy/retool_kit
|
||||
name = "crusher sword retool kit"
|
||||
desc = "A toolkit for changing the crusher's appearance without affecting the device's function. This one will make it look like a sword."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "retool_kit"
|
||||
denied_type = /obj/item/crusher_trophy/retool_kit
|
||||
///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 = "crusher_sword"
|
||||
///Specifies the icon state for the crusher's appearance in hand. Should appear in both icons/mob/inhands/weapons/hammers_lefthand.dmi and icons/mob/inhands/weapons/hammers_righthand.dmi
|
||||
var/retool_inhand_icon = "crusher_sword"
|
||||
///For if the retool kit changes the projectile's appearance. The sprite should be in icons/obj/weapons/guns/projectiles.dmi
|
||||
var/retool_projectile_icon = "pulse1"
|
||||
|
||||
/obj/item/crusher_trophy/retool_kit/effect_desc()
|
||||
return "the crusher to have the appearance of a sword"
|
||||
|
||||
/obj/item/crusher_trophy/retool_kit/add_to(obj/item/kinetic_crusher/pkc, mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
pkc.icon_state = retool_icon
|
||||
pkc.current_inhand_icon_state = retool_inhand_icon
|
||||
pkc.projectile_icon = retool_projectile_icon
|
||||
if(iscarbon(pkc.loc))
|
||||
var/mob/living/carbon/holder = pkc.loc
|
||||
holder.update_held_items()
|
||||
pkc.update_appearance()
|
||||
|
||||
/obj/item/crusher_trophy/retool_kit/remove_from(obj/item/kinetic_crusher/pkc)
|
||||
pkc.icon_state = initial(pkc.icon_state)
|
||||
pkc.current_inhand_icon_state = initial(pkc.current_inhand_icon_state)
|
||||
pkc.projectile_icon = initial(pkc.projectile_icon)
|
||||
if(iscarbon(pkc.loc))
|
||||
var/mob/living/carbon/holder = pkc.loc
|
||||
holder.update_held_items()
|
||||
pkc.update_appearance()
|
||||
..()
|
||||
|
||||
/obj/item/crusher_trophy/retool_kit/harpoon
|
||||
name = "crusher harpoon retool kit"
|
||||
desc = "A toolkit for changing the crusher's appearance without affecting the device's function. This one will make it look like a harpoon."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "retool_kit"
|
||||
denied_type = /obj/item/crusher_trophy/retool_kit
|
||||
retool_icon = "crusher_harpoon"
|
||||
retool_inhand_icon = "crusher_harpoon"
|
||||
retool_projectile_icon = "pulse_harpoon"
|
||||
|
||||
/obj/item/crusher_trophy/retool_kit/harpoon/effect_desc()
|
||||
return "the crusher to have the appearance of a harpoon"
|
||||
|
||||
/obj/item/crusher_trophy/retool_kit/dagger
|
||||
name = "crusher dagger retool kit"
|
||||
desc = "A toolkit for changing the crusher's appearance without affecting the device's function. This one will make it look like a dual dagger and mini-blaster on a chain."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "retool_kit"
|
||||
denied_type = /obj/item/crusher_trophy/retool_kit
|
||||
retool_icon = "crusher_dagger"
|
||||
retool_inhand_icon = "crusher_dagger"
|
||||
|
||||
/obj/item/crusher_trophy/retool_kit/dagger/effect_desc()
|
||||
return "the crusher to have the appearance of a dual dagger and blaster"
|
||||
|
||||
/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 = 'icons/obj/mining.dmi'
|
||||
icon_state = "retool_kit_skull"
|
||||
denied_type = /obj/item/crusher_trophy/retool_kit
|
||||
retool_icon = "crusher_skull"
|
||||
retool_inhand_icon = "crusher_skull"
|
||||
retool_projectile_icon = "pulse_skull"
|
||||
|
||||
/obj/item/crusher_trophy/retool_kit/ashenskull/effect_desc()
|
||||
return "the crusher to appear corrupted by infernal powers"
|
||||
|
||||
Reference in New Issue
Block a user