mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
mining modsuit changes (#69011)
the mining modsuit now costs 3000 from 2500 the mining modsuit now still slows you down over lava, though you still resist it the plasma core now accepts plasma both in sheet form and ore form the plasma core should no longer buggily not refill you the mining modsuit bombs should now have enemies target you
This commit is contained in:
@@ -283,13 +283,13 @@
|
||||
name = "MOD plasma core"
|
||||
icon_state = "mod-core-plasma"
|
||||
desc = "Nanotrasen's attempt at capitalizing on their plasma research. These plasma cores are refueled \
|
||||
through plasma ore, allowing for easy continued use by their mining squads."
|
||||
through plasma fuel, allowing for easy continued use by their mining squads."
|
||||
/// How much charge we can store.
|
||||
var/maxcharge = 10000
|
||||
/// How much charge we are currently storing.
|
||||
var/charge = 10000
|
||||
/// Charge per plasma ore.
|
||||
var/charge_given = 1500
|
||||
/// Associated list of charge sources and how much they charge, only stacks allowed.
|
||||
var/list/charger_list = list(/obj/item/stack/ore/plasma = 1500, /obj/item/stack/sheet/mineral/plasma = 2000)
|
||||
|
||||
/obj/item/mod/core/plasma/install(obj/item/mod/control/mod_unit)
|
||||
. = ..()
|
||||
@@ -345,12 +345,13 @@
|
||||
return COMPONENT_NO_AFTERATTACK
|
||||
return NONE
|
||||
|
||||
/obj/item/mod/core/plasma/proc/charge_plasma(obj/item/stack/ore/plasma/plasma, mob/user)
|
||||
if(!istype(plasma))
|
||||
/obj/item/mod/core/plasma/proc/charge_plasma(obj/item/stack/plasma, mob/user)
|
||||
var/charge_given = is_type_in_list(plasma, charger_list, zebra = TRUE)
|
||||
if(!charge_given)
|
||||
return FALSE
|
||||
var/uses_needed = min(plasma.amount, round((max_charge_amount() - charge_amount()) / charge_given))
|
||||
var/uses_needed = min(plasma.amount, ROUND_UP((max_charge_amount() - charge_amount()) / charge_given))
|
||||
if(!plasma.use(uses_needed))
|
||||
return FALSE
|
||||
add_charge(uses_needed*charge_given)
|
||||
add_charge(uses_needed * charge_given)
|
||||
balloon_alert(user, "core refueled")
|
||||
return TRUE
|
||||
|
||||
@@ -497,7 +497,6 @@
|
||||
ADD_TRAIT(mod.wearer, TRAIT_HANDS_BLOCKED, MOD_TRAIT)
|
||||
ADD_TRAIT(mod.wearer, TRAIT_FORCED_STANDING, MOD_TRAIT)
|
||||
ADD_TRAIT(mod.wearer, TRAIT_NOSLIPALL, MOD_TRAIT)
|
||||
mod.wearer.add_movespeed_mod_immunities(MOD_TRAIT, /datum/movespeed_modifier/turf_slowdown)
|
||||
mod.wearer.RemoveElement(/datum/element/footstep, FOOTSTEP_MOB_HUMAN, 1, -6)
|
||||
mod.wearer.AddElement(/datum/element/footstep, FOOTSTEP_OBJ_ROBOT, 1, -6, sound_vary = TRUE)
|
||||
mod.wearer.add_movespeed_modifier(/datum/movespeed_modifier/sphere)
|
||||
@@ -569,6 +568,12 @@
|
||||
light_color = COLOR_LIGHT_ORANGE
|
||||
ammo_type = /obj/structure/mining_bomb
|
||||
|
||||
/obj/projectile/bullet/reusable/mining_bomb/handle_drop()
|
||||
if(dropped)
|
||||
return
|
||||
dropped = TRUE
|
||||
new ammo_type(get_turf(src), firer)
|
||||
|
||||
/obj/structure/mining_bomb
|
||||
name = "mining bomb"
|
||||
desc = "A bomb. Why are you examining this?"
|
||||
@@ -591,26 +596,30 @@
|
||||
/// Image overlaid on explosion.
|
||||
var/static/image/explosion_image
|
||||
|
||||
/obj/structure/mining_bomb/Initialize(mapload)
|
||||
/obj/structure/mining_bomb/Initialize(mapload, atom/movable/firer)
|
||||
. = ..()
|
||||
if(!explosion_image)
|
||||
explosion_image = image('icons/effects/96x96.dmi', "judicial_explosion")
|
||||
explosion_image.pixel_x = -32
|
||||
explosion_image.pixel_y = -32
|
||||
explosion_image.plane = ABOVE_GAME_PLANE
|
||||
addtimer(CALLBACK(src, .proc/prime), prime_time)
|
||||
addtimer(CALLBACK(src, .proc/prime, firer), prime_time)
|
||||
|
||||
/obj/structure/mining_bomb/proc/prime()
|
||||
/obj/structure/mining_bomb/proc/prime(atom/movable/firer)
|
||||
add_overlay(explosion_image)
|
||||
addtimer(CALLBACK(src, .proc/boom), explosion_time)
|
||||
addtimer(CALLBACK(src, .proc/boom, firer), explosion_time)
|
||||
|
||||
/obj/structure/mining_bomb/proc/boom()
|
||||
/obj/structure/mining_bomb/proc/boom(atom/movable/firer)
|
||||
visible_message(span_danger("[src] explodes!"))
|
||||
playsound(src, 'sound/magic/magic_missile.ogg', 200, vary = TRUE)
|
||||
for(var/turf/closed/mineral/rock in circle_range_turfs(src, 2))
|
||||
rock.gets_drilled()
|
||||
for(var/mob/living/mob in range(1, src))
|
||||
mob.apply_damage(12 * (ishostile(mob) ? fauna_boost : 1), BRUTE, spread_damage = TRUE)
|
||||
if(!ishostile(mob) || !firer)
|
||||
continue
|
||||
var/mob/living/simple_animal/hostile/hostile_mob = mob
|
||||
hostile_mob.GiveTarget(firer)
|
||||
for(var/obj/object in range(1, src))
|
||||
object.take_damage(damage, BRUTE, BOMB)
|
||||
qdel(src)
|
||||
|
||||
Reference in New Issue
Block a user