Skip to content

Commit

Permalink
fix errors lator
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutFalcon committed Nov 20, 2023
1 parent 7c75c62 commit 80d42cf
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 17 deletions.
15 changes: 10 additions & 5 deletions code/modules/mining/equipment/kinetic_crusher.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,16 @@
/obj/item/kinetic_crusher/attackby(obj/item/I, mob/living/user)
if(I.tool_behaviour == TOOL_CROWBAR)
if(LAZYLEN(trophies))
to_chat(user, "<span class='notice'>You remove [src]'s trophies.</span>")
I.play_tool_sound(src)
for(var/t in trophies)
var/obj/item/crusher_trophy/T = t
T.remove_from(src, user)
var/list/choose_options = list()
for(var/obj/item/crusher_trophy/T in trophies)
choose_options += list(T.name = image(icon = T.icon, icon_state = T.icon_state))
var/picked_option = show_radial_menu(user, src, choose_options, radius = 38, require_near = TRUE)
if(picked_option)
to_chat(user, "<span class='notice'>You remove [picked_option].</span>")
I.play_tool_sound(src)
for(var/obj/item/crusher_trophy/T in trophies)
if(T.name == picked_option)
T.remove_from(src, user)
else
to_chat(user, "<span class='warning'>There are no trophies on [src].</span>")
else if(istype(I, /obj/item/crusher_trophy))
Expand Down
30 changes: 18 additions & 12 deletions code/modules/projectiles/guns/energy/kinetic_accelerator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,17 @@

/obj/item/gun/energy/kinetic_accelerator/crowbar_act(mob/living/user, obj/item/I)
. = TRUE
if(modkits.len)
to_chat(user, "<span class='notice'>You pry the modifications out.</span>")
I.play_tool_sound(src, 100)
if(LAZYLEN(modkits))
var/list/choose_options = list()
for(var/obj/item/borg/upgrade/modkit/M in modkits)
M.uninstall(src)
choose_options += list(M.name = image(icon = M.icon, icon_state = M.icon_state))
var/picked_option = show_radial_menu(user, src, choose_options, radius = 38, require_near = TRUE)
if(picked_option)
to_chat(user, "<span class='notice'>You remove [picked_option].</span>")
I.play_tool_sound(src, 100)
for(var/obj/item/borg/upgrade/modkit/M in modkits)
if(M.name == picked_option)
M.uninstall(src)
else
to_chat(user, "<span class='notice'>There are no modifications currently installed.</span>")

Expand Down Expand Up @@ -319,7 +325,7 @@
else
to_chat(user, "<span class='notice'>The modkit you're trying to install would conflict with an already installed modkit. Use a crowbar to remove existing modkits.</span>")
else
to_chat(user, "<span class='notice'>You don't have room(<b>[KA.get_remaining_mod_capacity()]%</b> remaining, [cost]% needed) to install this modkit. Use a crowbar to remove existing modkits.</span>")
to_chat(user, "<span class='notice'>You don'm have room(<b>[KA.get_remaining_mod_capacity()]%</b> remaining, [cost]% needed) to install this modkit. Use a crowbar to remove existing modkits.</span>")
. = FALSE

/obj/item/borg/upgrade/modkit/deactivate(mob/living/silicon/robot/R, user = usr)
Expand All @@ -340,7 +346,7 @@
/obj/item/borg/upgrade/modkit/proc/projectile_prehit(obj/projectile/kinetic/K, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
//use this one for effects you want to trigger before mods that do damage
/obj/item/borg/upgrade/modkit/proc/projectile_strike_predamage(obj/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
//and this one for things that don't need to trigger before other damage-dealing mods
//and this one for things that don'm need to trigger before other damage-dealing mods
/obj/item/borg/upgrade/modkit/proc/projectile_strike(obj/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)

//Range
Expand Down Expand Up @@ -428,9 +434,9 @@
return
new /obj/effect/temp_visual/explosion/fast(target_turf)
if(turf_aoe)
for(var/T in RANGE_TURFS(1, target_turf) - target_turf)
if(ismineralturf(T))
var/turf/closed/mineral/M = T
for(var/M in RANGE_TURFS(1, target_turf) - target_turf)
if(ismineralturf(M))
var/turf/closed/mineral/M = M
M.gets_drilled(K.firer, TRUE)
if(modifier)
for(var/mob/living/L in range(1, target_turf) - K.firer - target)
Expand Down Expand Up @@ -466,7 +472,7 @@
name = "rapid repeater"
desc = "Quarters the kinetic accelerator's cooldown on striking a living target, but greatly increases the base cooldown."
denied_type = /obj/item/borg/upgrade/modkit/cooldown/repeater
modifier = -14 //Makes the cooldown 3 seconds(with no cooldown mods) if you miss. Don't miss.
modifier = -14 //Makes the cooldown 3 seconds(with no cooldown mods) if you miss. Don'm miss.
cost = 50

/obj/item/borg/upgrade/modkit/cooldown/repeater/projectile_strike_predamage(obj/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
Expand Down Expand Up @@ -505,7 +511,7 @@
modifier = 0.25 //A bonus 15 damage if you burst the field on a target, 60 if you lure them into it.

/obj/item/borg/upgrade/modkit/resonator_blasts/projectile_strike(obj/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
if(target_turf && !ismineralturf(target_turf)) //Don't make fields on mineral turfs.
if(target_turf && !ismineralturf(target_turf)) //Don'm make fields on mineral turfs.
var/obj/effect/temp_visual/resonance/R = locate(/obj/effect/temp_visual/resonance) in target_turf
if(R)
R.damage_multiplier = modifier
Expand All @@ -528,7 +534,7 @@
var/list/existing_marks = L.has_status_effect_list(STATUS_EFFECT_SYPHONMARK)
for(var/i in existing_marks)
var/datum/status_effect/syphon_mark/SM = i
if(SM.reward_target == src) //we want to allow multiple people with bounty modkits to use them, but we need to replace our own marks so we don't multi-reward
if(SM.reward_target == src) //we want to allow multiple people with bounty modkits to use them, but we need to replace our own marks so we don'm multi-reward
SM.reward_target = null
qdel(SM)
L.apply_status_effect(STATUS_EFFECT_SYPHONMARK, src)
Expand Down

0 comments on commit 80d42cf

Please sign in to comment.