Merge remote-tracking branch 'origin/master' into TGUI-3.0

This commit is contained in:
Artur
2020-07-02 23:23:47 +03:00
190 changed files with 4635 additions and 3663 deletions

View File

@@ -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,33 +26,45 @@
var/backstab_bonus = 30
var/light_on = FALSE
var/brightness_on = 7
var/wielded = FALSE // track wielded status on item
/obj/item/twohanded/kinetic_crusher/cyborg //probably give this a unique sprite later
/obj/item/kinetic_crusher/cyborg //probably give this a unique sprite later
desc = "An integrated version of the standard kinetic crusher with a grinded down axe head to dissuade mis-use against crewmen. Deals damage equal to the standard crusher against creatures, however."
force = 10 //wouldn't want to give a borg a 20 brute melee weapon unemagged now would we
detonation_damage = 60
wielded = 1
/obj/item/twohanded/kinetic_crusher/cyborg/unwield()
return
/obj/item/kinetic_crusher/Initialize()
. = ..()
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
/obj/item/twohanded/kinetic_crusher/Initialize()
/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_wielded + detonation_damage]</b> damage.</span>"
. += "<span class='notice'>Does <b>[force_wielded + detonation_damage + backstab_bonus]</b> damage if the target is backstabbed, instead of <b>[force_wielded + detonation_damage]</b>.</span>"
. += "<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>"
for(var/t in trophies)
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(istype(I, /obj/item/crowbar))
if(LAZYLEN(trophies))
to_chat(user, "<span class='notice'>You remove [src]'s trophies.</span>")
@@ -70,7 +80,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.")
return
@@ -84,7 +94,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(istype(target, /obj/item/crusher_trophy))
var/obj/item/crusher_trophy/T = target
@@ -137,28 +147,28 @@
if(user && lavaland_equipment_pressure_check(get_turf(user))) //CIT CHANGE - makes sure below only happens in low pressure environments
user.adjustStaminaLoss(-30)//CIT CHANGE - makes crushers heal stamina
/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, 1)
/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"
@@ -175,7 +185,7 @@
flag = "bomb"
range = 6
log_override = TRUE
var/obj/item/twohanded/kinetic_crusher/hammer_synced
var/obj/item/kinetic_crusher/hammer_synced
/obj/item/projectile/destabilizer/Destroy()
hammer_synced = null
@@ -214,12 +224,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))
@@ -231,7 +241,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
@@ -318,12 +328,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
@@ -376,21 +386,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)

View File

@@ -32,7 +32,7 @@
new /datum/data/mining_equipment("500 Point Transfer Card", /obj/item/card/mining_point_card/mp500, 500),
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("Survival Medipen", /obj/item/reagent_containers/hypospray/medipen/survival, 750),
new /datum/data/mining_equipment("Brute First-Aid Kit", /obj/item/storage/firstaid/brute, 800),
@@ -221,7 +221,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)

View File

@@ -210,7 +210,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'
@@ -224,12 +224,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("[user] attaches [I] to [src].", "<span class='notice'>You attach [I] to [src].</span>")
wires = new /datum/wires/explosive/gibtonite(src)
@@ -257,22 +261,22 @@ 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/item/projectile/P)
/obj/item/gibtonite/bullet_act(obj/item/projectile/P)
GibtoniteReaction(P.firer)
return ..()
/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,1)
@@ -298,7 +302,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
log_game("[key_name(user)] has primed a [name] for detonation at [AREACOORD(bombturf)]")
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)