diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 764197155e..35082be03e 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -372,6 +372,7 @@ icon_state = "walkboots" var/walkcool = 0 var/wallcharges = 4 + var/newlocobject = null //sparks, maybe oxydamage instead /obj/item/clothing/shoes/wallwalkers/equipped(mob/user,slot) @@ -385,20 +386,22 @@ ..() LAZYREMOVE(user.user_movement_hooks,src) -/obj/item/clothing/shoes/wallwalkers/attackby(obj/item/I, mob/user, params) - . = ..() //yes this is shamelessly copied - if(istype(I, /obj/item/stack/ore/bluespace_crystal)) - var/obj/item/stack/ore/bluespace_crystal/B = I - wallcharges += 1 - to_chat(user, "You tap the [src] with the [I].") - if(B.amount > 1) - B.amount -= 1 +/obj/item/clothing/shoes/wallwalkers/attackby(obj/item/W, mob/user, params) + if(istype(W, /obj/item/bluespacerecharge)) + var/obj/item/bluespacerecharge/ER = W + if(ER.uses) + wallcharges += ER.uses + to_chat(user, "You charged the bluespace crystal in the [src]. It now has [wallcharges] charges left.") + ER.uses = 0 + ER.icon_state = "[initial(ER.icon_state)]0" else - qdel(I) + to_chat(user, "[ER] has no crystal on it.") + return + . = ..() /obj/item/clothing/shoes/wallwalkers/examine(mob/user) . = ..() - . += "It has [wallcharges] charges left. Recharge with bluespace crystals." + . += "It has [wallcharges] charges left." /obj/item/clothing/shoes/wallwalkers/intercept_user_move(dir,mob/living/m,newloc,oldloc) if (walkcool < world.time && m.m_intent == MOVE_INTENT_WALK && wallcharges > 0) @@ -412,15 +415,17 @@ for (var/atom/T in newloc) //stuff on the new turf if (!T.CanPass(m,newloc) && T != m) issolid = TRUE + newlocobject = T break if (!issolid) for (var/atom/T in oldloc) //directional shit on the old turf - if (!T.CanPass(m,newloc) && T != m) + if (!T.CanPass(m,newloc) && T != m && T != newlocobject) issolid = TRUE break + newlocobject = null //stopping structures from using two charges because of how shitty the canpass code is m.forceMove(newloc) if (issolid) - m.adjustOxyLoss(rand(5,15)) + m.adjustOxyLoss(rand(5,13)) if (prob(10)) m.adjustBruteLoss(rand(3,5)) to_chat(m,"You feel as if travelling through the solid object left something behind and it hurts!") @@ -428,4 +433,33 @@ s.set_up(5, 1, oldloc) s.start() flash_lighting_fx(3, 3, LIGHT_COLOR_ORANGE) - wallcharges-- \ No newline at end of file + wallcharges-- + +/obj/item/bluespacerecharge + name = "bluespace crystal recharging device" + desc = "A small cell with two prongs lazily jabbed into it. It looks like it's made for replacing the crystals in bluespace devices." + icon = 'icons/obj/module.dmi' + icon_state = "bluespace_charge" + item_flags = NOBLUDGEON + var/uses = 6 + +/obj/item/bluespacerecharge/examine(mob/user) + . = ..() + if(uses) + . += "It can add up to [uses] charges to compatible devices." + else + . += "The crystal is gone." + +/obj/item/bluespacerecharge/attackby(obj/item/I, mob/user, params) + ..() + if(istype(I, /obj/item/stack/ore/bluespace_crystal) && !uses) + var/obj/item/stack/ore/bluespace_crystal/B = I + if (B.amount < 10) + return + uses += 3 + to_chat(user, "You insert [I] into [src].") + if(B.amount > 10) + B.amount -= 10 + else + qdel(I) + icon_state = initial(icon_state) \ No newline at end of file diff --git a/icons/obj/module.dmi b/icons/obj/module.dmi index ace24db5ff..a647bebd57 100644 Binary files a/icons/obj/module.dmi and b/icons/obj/module.dmi differ