First attempt at making size change damage (doesn't work yet)

This commit is contained in:
BlackMajor
2019-06-01 02:45:14 +12:00
parent 2b1931c217
commit 46123cb1fa
4 changed files with 26 additions and 2 deletions
+3
View File
@@ -109,6 +109,9 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
var/list/grind_results //A reagent list containing the reagents this item produces when ground up in a grinder - this can be an empty list to allow for reagent transferring only
var/list/juice_results //A reagent list containing blah blah... but when JUICED in a grinder!
//Compression kit vars
var/force_mult = 1
/obj/item/Initialize()
materials = typelist("materials", materials)
@@ -2,16 +2,35 @@
name = "bluespace compression kit"
desc = "An illegally modified BSRPED, capable of reducing the size of most items."
icon = 'icons/obj/tools.dmi'
icon_state = "compression"
icon_state = "compression_c"
item_state = "RPED"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
w_class = WEIGHT_CLASS_NORMAL
var/charges = 5
var/damage_multiplier = 0.2 // Changing this effects how much more or less damage a resized item will do
var/mode = 0
/obj/item/compressionkit/examine(mob/user)
..()
to_chat(user, "<span class='notice'>It has [charges] charges left.</span>")
to_chat(user, "<span class='notice'>It has [charges] charges left. Recharge with bluespace crystals.</span>")
to_chat(user, "<span class='notice'>Use in-hand to swap toggle compress/expand mode (expand mode not yet implemented).</span>")
/obj/item/compressionkit/attack_self(mob/user)
if(mode == 0)
mode = 1
icon_state = "compression_e"
to_chat(user, "<span class='notice'>You switch the compressor to expand mode. This isn't implemented yet, so right now it wont do anything different!</span>")
return
if(mode == 1)
mode = 0
icon_state = "compression_c"
to_chat(user, "<span class='notice'>You switch the compressor to compress mode. Usage will now reduce the size of objects.</span>")
return
else
mode = 0
icon_state = "compression_c"
to_chat(user, "<span class='notice'>Some coder cocked up or an admin broke your compressor. It's been set back to compress mode..</span>")
/obj/item/compressionkit/proc/sparks()
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
@@ -64,6 +83,7 @@
sparks()
flash_lighting_fx(3, 3, LIGHT_COLOR_CYAN)
O.w_class -= 1
O.force_mult -= damage_multiplier
charges -= 1
to_chat(user, "<span class='notice'>You successfully compress [target]! The compressor now has [charges] charges.</span>")
else