mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Merge branch 'master' of https://github.com/tgstation/tgstation into guardianfixes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*********************Mining Hammer****************/
|
||||
/obj/item/twohanded/kinetic_crusher
|
||||
/obj/item/kinetic_crusher
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "crusher"
|
||||
item_state = "crusher0"
|
||||
@@ -11,8 +11,6 @@
|
||||
force = 0 //You can't hit stuff unless wielded
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
force_unwielded = 0
|
||||
force_wielded = 20
|
||||
throwforce = 5
|
||||
throw_speed = 4
|
||||
armour_penetration = 10
|
||||
@@ -28,16 +26,31 @@
|
||||
var/backstab_bonus = 30
|
||||
var/light_on = FALSE
|
||||
var/brightness_on = 5
|
||||
var/wielded = FALSE // track wielded status on item
|
||||
|
||||
/obj/item/twohanded/kinetic_crusher/Initialize()
|
||||
/obj/item/kinetic_crusher/Initialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
|
||||
|
||||
/obj/item/kinetic_crusher/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 60, 110) //technically it's huge and bulky, but this provides an incentive to use it
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=0, force_wielded=20)
|
||||
|
||||
/obj/item/twohanded/kinetic_crusher/Destroy()
|
||||
/obj/item/kinetic_crusher/Destroy()
|
||||
QDEL_LIST(trophies)
|
||||
return ..()
|
||||
|
||||
/obj/item/twohanded/kinetic_crusher/examine(mob/living/user)
|
||||
/// triggered on wield of two handed item
|
||||
/obj/item/kinetic_crusher/proc/on_wield(obj/item/source, mob/user)
|
||||
wielded = TRUE
|
||||
|
||||
/// triggered on unwield of two handed item
|
||||
/obj/item/kinetic_crusher/proc/on_unwield(obj/item/source, mob/user)
|
||||
wielded = FALSE
|
||||
|
||||
/obj/item/kinetic_crusher/examine(mob/living/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>Mark a large creature with the destabilizing force, then hit them in melee to do <b>[force + detonation_damage]</b> damage.</span>"
|
||||
. += "<span class='notice'>Does <b>[force + detonation_damage + backstab_bonus]</b> damage if the target is backstabbed, instead of <b>[force + detonation_damage]</b>.</span>"
|
||||
@@ -45,7 +58,7 @@
|
||||
var/obj/item/crusher_trophy/T = t
|
||||
. += "<span class='notice'>It has \a [T] attached, which causes [T.effect_desc()].</span>"
|
||||
|
||||
/obj/item/twohanded/kinetic_crusher/attackby(obj/item/I, mob/living/user)
|
||||
/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>")
|
||||
@@ -61,7 +74,7 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/twohanded/kinetic_crusher/attack(mob/living/target, mob/living/carbon/user)
|
||||
/obj/item/kinetic_crusher/attack(mob/living/target, mob/living/carbon/user)
|
||||
if(!wielded)
|
||||
to_chat(user, "<span class='warning'>[src] is too heavy to use with one hand! You fumble and drop everything.</span>")
|
||||
user.drop_all_held_items()
|
||||
@@ -76,7 +89,7 @@
|
||||
if(!QDELETED(C) && !QDELETED(target))
|
||||
C.total_damage += target_health - target.health //we did some damage, but let's not assume how much we did
|
||||
|
||||
/obj/item/twohanded/kinetic_crusher/afterattack(atom/target, mob/living/user, proximity_flag, clickparams)
|
||||
/obj/item/kinetic_crusher/afterattack(atom/target, mob/living/user, proximity_flag, clickparams)
|
||||
. = ..()
|
||||
if(!wielded)
|
||||
return
|
||||
@@ -123,28 +136,28 @@
|
||||
C.total_damage += detonation_damage
|
||||
L.apply_damage(detonation_damage, BRUTE, blocked = def_check)
|
||||
|
||||
/obj/item/twohanded/kinetic_crusher/proc/Recharge()
|
||||
/obj/item/kinetic_crusher/proc/Recharge()
|
||||
if(!charged)
|
||||
charged = TRUE
|
||||
update_icon()
|
||||
playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, TRUE)
|
||||
|
||||
/obj/item/twohanded/kinetic_crusher/ui_action_click(mob/user, actiontype)
|
||||
/obj/item/kinetic_crusher/ui_action_click(mob/user, actiontype)
|
||||
light_on = !light_on
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, TRUE)
|
||||
update_brightness(user)
|
||||
update_icon()
|
||||
|
||||
/obj/item/twohanded/kinetic_crusher/proc/update_brightness(mob/user = null)
|
||||
/obj/item/kinetic_crusher/proc/update_brightness(mob/user = null)
|
||||
if(light_on)
|
||||
set_light(brightness_on)
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
/obj/item/twohanded/kinetic_crusher/update_icon_state()
|
||||
item_state = "crusher[wielded]"
|
||||
/obj/item/kinetic_crusher/update_icon_state()
|
||||
item_state = "crusher[wielded]" // this is not icon_state and not supported by 2hcomponent
|
||||
|
||||
/obj/item/twohanded/kinetic_crusher/update_overlays()
|
||||
/obj/item/kinetic_crusher/update_overlays()
|
||||
. = ..()
|
||||
if(!charged)
|
||||
. += "[icon_state]_uncharged"
|
||||
@@ -161,7 +174,7 @@
|
||||
flag = "bomb"
|
||||
range = 6
|
||||
log_override = TRUE
|
||||
var/obj/item/twohanded/kinetic_crusher/hammer_synced
|
||||
var/obj/item/kinetic_crusher/hammer_synced
|
||||
|
||||
/obj/projectile/destabilizer/Destroy()
|
||||
hammer_synced = null
|
||||
@@ -200,12 +213,12 @@
|
||||
return "errors"
|
||||
|
||||
/obj/item/crusher_trophy/attackby(obj/item/A, mob/living/user)
|
||||
if(istype(A, /obj/item/twohanded/kinetic_crusher))
|
||||
if(istype(A, /obj/item/kinetic_crusher))
|
||||
add_to(A, user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/crusher_trophy/proc/add_to(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
|
||||
/obj/item/crusher_trophy/proc/add_to(obj/item/kinetic_crusher/H, mob/living/user)
|
||||
for(var/t in H.trophies)
|
||||
var/obj/item/crusher_trophy/T = t
|
||||
if(istype(T, denied_type) || istype(src, T.denied_type))
|
||||
@@ -217,7 +230,7 @@
|
||||
to_chat(user, "<span class='notice'>You attach [src] to [H].</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/item/crusher_trophy/proc/remove_from(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
|
||||
/obj/item/crusher_trophy/proc/remove_from(obj/item/kinetic_crusher/H, mob/living/user)
|
||||
forceMove(get_turf(H))
|
||||
H.trophies -= src
|
||||
return TRUE
|
||||
@@ -304,12 +317,12 @@
|
||||
/obj/item/crusher_trophy/legion_skull/effect_desc()
|
||||
return "a kinetic crusher to recharge <b>[bonus_value*0.1]</b> second\s faster"
|
||||
|
||||
/obj/item/crusher_trophy/legion_skull/add_to(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
|
||||
/obj/item/crusher_trophy/legion_skull/add_to(obj/item/kinetic_crusher/H, mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
H.charge_time -= bonus_value
|
||||
|
||||
/obj/item/crusher_trophy/legion_skull/remove_from(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
|
||||
/obj/item/crusher_trophy/legion_skull/remove_from(obj/item/kinetic_crusher/H, mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
H.charge_time += bonus_value
|
||||
@@ -362,21 +375,19 @@
|
||||
/obj/item/crusher_trophy/demon_claws/effect_desc()
|
||||
return "melee hits to do <b>[bonus_value * 0.2]</b> more damage and heal you for <b>[bonus_value * 0.1]</b>, with <b>5X</b> effect on mark detonation"
|
||||
|
||||
/obj/item/crusher_trophy/demon_claws/add_to(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
|
||||
/obj/item/crusher_trophy/demon_claws/add_to(obj/item/kinetic_crusher/H, mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
H.force += bonus_value * 0.2
|
||||
H.force_unwielded += bonus_value * 0.2
|
||||
H.force_wielded += bonus_value * 0.2
|
||||
H.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/twohanded/kinetic_crusher/H, mob/living/user)
|
||||
/obj/item/crusher_trophy/demon_claws/remove_from(obj/item/kinetic_crusher/H, mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
H.force -= bonus_value * 0.2
|
||||
H.force_unwielded -= bonus_value * 0.2
|
||||
H.force_wielded -= bonus_value * 0.2
|
||||
H.detonation_damage -= bonus_value * 0.8
|
||||
AddComponent(/datum/component/two_handed, force_wielded=20)
|
||||
|
||||
/obj/item/crusher_trophy/demon_claws/on_melee_hit(mob/living/target, mob/living/user)
|
||||
user.heal_ordered_damage(bonus_value * 0.1, damage_heal_order)
|
||||
@@ -448,19 +459,19 @@
|
||||
denied_type = /obj/item/crusher_trophy/king_goat
|
||||
|
||||
/obj/item/crusher_trophy/king_goat/effect_desc()
|
||||
return "you to passivily recharge markers 5x as fast while equipped and do a decent amount of damage at the cost of dulling the blade"
|
||||
return "you also passively recharge markers 5x as fast while equipped and do a decent amount of damage at the cost of dulling the blade"
|
||||
|
||||
/obj/item/crusher_trophy/king_goat/on_projectile_fire(obj/projectile/destabilizer/marker, mob/living/user)
|
||||
marker.damage = 10 //in my testing only does damage to simple mobs so should be fine to have it high
|
||||
|
||||
/obj/item/crusher_trophy/king_goat/add_to(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
|
||||
/obj/item/crusher_trophy/king_goat/add_to(obj/item/kinetic_crusher/H, mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
H.charge_time = 3
|
||||
H.force_wielded = 5
|
||||
H.AddComponent(/datum/component/two_handed, force_wielded=5)
|
||||
|
||||
/obj/item/crusher_trophy/king_goat/remove_from(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
|
||||
/obj/item/crusher_trophy/king_goat/remove_from(obj/item/kinetic_crusher/H, mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
H.charge_time = 15
|
||||
H.force_wielded = 20
|
||||
H.AddComponent(/datum/component/two_handed, force_wielded=20)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
var/obj/item/organ/regenerative_core/C = M
|
||||
if(!istype(C, /obj/item/organ/regenerative_core))
|
||||
to_chat(user, "<span class='warning'>The stabilizer only works on certain types of monster organs, generally regenerative in nature.</span>")
|
||||
return ..()
|
||||
return
|
||||
|
||||
C.preserved()
|
||||
to_chat(user, "<span class='notice'>You inject the [M] with the stabilizer. It will no longer go inert.</span>")
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
|
||||
//Signs
|
||||
/obj/structure/sign/mining
|
||||
name = "nanotrasen mining corps sign"
|
||||
name = "\improper Nanotrasen mining corps sign"
|
||||
desc = "A sign of relief for weary miners, and a warning for would-be competitors to Nanotrasen's mining claims."
|
||||
icon = 'icons/turf/walls/survival_pod_walls.dmi'
|
||||
icon_state = "ntpod"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
new /datum/data/mining_equipment("Brute First-Aid Kit", /obj/item/storage/firstaid/brute, 600),
|
||||
new /datum/data/mining_equipment("Tracking Implant Kit", /obj/item/storage/box/minertracker, 600),
|
||||
new /datum/data/mining_equipment("Jaunter", /obj/item/wormhole_jaunter, 750),
|
||||
new /datum/data/mining_equipment("Kinetic Crusher", /obj/item/twohanded/kinetic_crusher, 750),
|
||||
new /datum/data/mining_equipment("Kinetic Crusher", /obj/item/kinetic_crusher, 750),
|
||||
new /datum/data/mining_equipment("Kinetic Accelerator", /obj/item/gun/energy/kinetic_accelerator, 750),
|
||||
new /datum/data/mining_equipment("Advanced Scanner", /obj/item/t_scanner/adv_mining_scanner, 800),
|
||||
new /datum/data/mining_equipment("Resonator", /obj/item/resonator, 800),
|
||||
@@ -191,7 +191,7 @@
|
||||
new /obj/item/stack/marker_beacon/thirty(drop_location)
|
||||
if("Crusher Kit")
|
||||
new /obj/item/extinguisher/mini(drop_location)
|
||||
new /obj/item/twohanded/kinetic_crusher(drop_location)
|
||||
new /obj/item/kinetic_crusher(drop_location)
|
||||
if("Mining Conscription Kit")
|
||||
new /obj/item/storage/backpack/duffelbag/mining_conscript(drop_location)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#define MINEDRONE_ATTACK 2
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone
|
||||
name = "nanotrasen minebot"
|
||||
name = "\improper Nanotrasen minebot"
|
||||
desc = "The instructions printed on the side read: This is a small robot used to support miners, can be set to search and collect loose ore, or to help fend off wildlife."
|
||||
gender = NEUTER
|
||||
icon = 'icons/mob/aibots.dmi'
|
||||
|
||||
@@ -218,7 +218,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
item_state = "slag"
|
||||
singular_name = "slag chunk"
|
||||
|
||||
/obj/item/twohanded/required/gibtonite
|
||||
/obj/item/gibtonite
|
||||
name = "gibtonite ore"
|
||||
desc = "Extremely explosive if struck with mining equipment, Gibtonite is often used by miners to speed up their work by using it as a mining charge. This material is illegal to possess by unauthorized personnel under space law."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
@@ -232,12 +232,16 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
var/attacher = "UNKNOWN"
|
||||
var/det_timer
|
||||
|
||||
/obj/item/twohanded/required/gibtonite/Destroy()
|
||||
/obj/item/gibtonite/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, require_twohands=TRUE)
|
||||
|
||||
/obj/item/gibtonite/Destroy()
|
||||
qdel(wires)
|
||||
wires = null
|
||||
return ..()
|
||||
|
||||
/obj/item/twohanded/required/gibtonite/attackby(obj/item/I, mob/user, params)
|
||||
/obj/item/gibtonite/attackby(obj/item/I, mob/user, params)
|
||||
if(!wires && istype(I, /obj/item/assembly/igniter))
|
||||
user.visible_message("<span class='notice'>[user] attaches [I] to [src].</span>", "<span class='notice'>You attach [I] to [src].</span>")
|
||||
wires = new /datum/wires/explosive/gibtonite(src)
|
||||
@@ -265,20 +269,20 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/twohanded/required/gibtonite/attack_self(user)
|
||||
/obj/item/gibtonite/attack_self(user)
|
||||
if(wires)
|
||||
wires.interact(user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/twohanded/required/gibtonite/bullet_act(obj/projectile/P)
|
||||
/obj/item/gibtonite/bullet_act(obj/projectile/P)
|
||||
GibtoniteReaction(P.firer)
|
||||
. = ..()
|
||||
|
||||
/obj/item/twohanded/required/gibtonite/ex_act()
|
||||
/obj/item/gibtonite/ex_act()
|
||||
GibtoniteReaction(null, 1)
|
||||
|
||||
/obj/item/twohanded/required/gibtonite/proc/GibtoniteReaction(mob/user, triggered_by = 0)
|
||||
/obj/item/gibtonite/proc/GibtoniteReaction(mob/user, triggered_by = 0)
|
||||
if(!primed)
|
||||
primed = TRUE
|
||||
playsound(src,'sound/effects/hit_on_shattered_glass.ogg',50,TRUE)
|
||||
@@ -301,7 +305,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
log_bomber(user, "has primed a", src, "for detonation", notify_admins)
|
||||
det_timer = addtimer(CALLBACK(src, .proc/detonate, notify_admins), det_time, TIMER_STOPPABLE)
|
||||
|
||||
/obj/item/twohanded/required/gibtonite/proc/detonate(notify_admins)
|
||||
/obj/item/gibtonite/proc/detonate(notify_admins)
|
||||
if(primed)
|
||||
switch(quality)
|
||||
if(GIBTONITE_QUALITY_HIGH)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
/datum/map_template/shelter/alpha/New()
|
||||
. = ..()
|
||||
blacklisted_turfs = typecacheof(/turf/open/indestructible) //yogs added indestructible floors to the shelter black list
|
||||
blacklisted_turfs = typecacheof(/turf/open/indestructible)
|
||||
whitelisted_turfs = typecacheof(/turf/closed/mineral)
|
||||
banned_objects = typecacheof(/obj/structure/stone_tile)
|
||||
|
||||
@@ -73,6 +73,6 @@
|
||||
|
||||
/datum/map_template/shelter/charlie/New()
|
||||
. = ..()
|
||||
blacklisted_turfs = typecacheof(/turf/open/indestructible) //yogs added indestructible floors to the shelter black list
|
||||
blacklisted_turfs = typecacheof(/turf/open/indestructible)
|
||||
whitelisted_turfs = typecacheof(/turf/closed/mineral)
|
||||
banned_objects = typecacheof(/obj/structure/stone_tile)
|
||||
|
||||
Reference in New Issue
Block a user