This commit is contained in:
SandPoot
2022-10-12 22:25:25 -03:00
93 changed files with 1311 additions and 901 deletions
@@ -0,0 +1,50 @@
/datum/gauntlet_style
var/name = "Baseline"
var/desc = "Somehow, you sense two things; one, that there's no combos on this, and two, that you should probably have someone address this."
var/obj/item/kinetic_crusher/glaive/gauntlets/hands // catch these
/datum/gauntlet_style/proc/on_apply(obj/item/kinetic_crusher/glaive/gauntlets/theseNewHands)
hands = theseNewHands
return // todo: changing variables per style
/datum/gauntlet_style/proc/check_streak(mob/living/carbon/human/attacker, mob/living/defender)
return FALSE
/datum/gauntlet_style/proc/reset_streak(mob/living/carbon/user)
hands.streak = ""
user?.hud_used?.combo_display.update_icon_state(hands.streak)
/datum/gauntlet_style/proc/examine_more_info()
return desc
#define BRAWLER_COMBO_CROSS "DH"
/datum/gauntlet_style/brawler
name = "Rough and Tumble"
desc = "Throwing a punch is simple. Throwing a punch with a destabilizing module strapped to your hand is less so, but still doable."
/datum/gauntlet_style/brawler/examine_more_info()
var/msg = list(span_notice(desc))
msg += "Techniques:"
msg += "Cross Punch - Disarm, Harm. In addition to being a regular strike, deals an extra third of a regular detonation's damage." // this wording kinda sucks i think
return msg
/datum/gauntlet_style/brawler/check_streak(mob/living/carbon/human/attacker, mob/living/defender)
if(findtext(hands.streak, BRAWLER_COMBO_CROSS))
crossCombo(attacker, defender)
return TRUE
return FALSE
/datum/gauntlet_style/brawler/proc/crossCombo(mob/living/carbon/attacker, mob/living/defender)
reset_streak(attacker)
playsound(attacker, 'sound/weapons/punch4.ogg', 100, FALSE)
var/bonus_damage = (hands.force + hands.detonation_damage) / 3
defender.apply_damage(bonus_damage, BRUTE, blocked = defender.getarmor(type = BOMB))
var/datum/status_effect/crusher_damage/cd_tracker = defender.has_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING)
if(!QDELETED(defender) && !QDELETED(cd_tracker))
cd_tracker.total_damage += bonus_damage //we did some damage, but let's not assume how much we did
defender.visible_message("<span class='warning'>[attacker] delivers a solid one-two punch to [defender]!</span>", \
"<span class='userdanger'>[attacker] hits you with a solid one-two punch!</span>")
return TRUE
#undef BRAWLER_COMBO_CROSS
@@ -244,9 +244,10 @@
/obj/item/kinetic_crusher/glaive/gauntlets
name = "proto-kinetic gauntlets"
desc = "A pair of scaled-down proto-kinetic crusher destabilizer modules shoved into gauntlets and greaves, often used by \
those who wish to spit in the eyes of God. Sacrifices outright damage for \
a reliance on backstabs and the ability to give fauna concussions on a parry."
desc = "A pair of scaled-down proto-kinetic crusher destabilizer modules shoved into gauntlets and concealed greaves, \
often fielded by those who wish to spit in the eyes of God. Sacrifices outright damage for \
a reliance on backstabs and the ability to stagger fauna on a parry, \
slowing them and increasing the time between their special attacks."
attack_verb = list("pummeled", "punched", "jabbed", "hammer-fisted", "uppercut", "slammed")
hitsound = 'sound/weapons/resonator_blast.ogg'
sharpness = SHARP_NONE // use your survival dagger or smth
@@ -256,6 +257,26 @@
"Fingerless" = "crusher-hands-bare")
detonation_damage = 45 // 60 on wield, compared to normal crusher's 70
backstab_bonus = 70 // 130 on backstab though
var/combo_on_anything = FALSE // @admins if you're varediting this you don't get to whine at me
var/streak = "" // you know what time it is
var/max_streak_length = 2 // changes with style module
var/mob/living/current_target
var/datum/gauntlet_style/active_style
/obj/item/kinetic_crusher/glaive/gauntlets/Initialize(mapload)
. = ..()
active_style = new /datum/gauntlet_style/brawler
active_style.on_apply(src)
/obj/item/kinetic_crusher/glaive/gauntlets/examine(mob/living/user)
. = ..()
. += "According to a very small display, the currently loaded style is \"[active_style.name]\"."
/obj/item/kinetic_crusher/glaive/gauntlets/examine_more(mob/user)
return active_style.examine_more_info()
/obj/item/kinetic_crusher/glaive/gauntlets/proc/style_change(datum/gauntlet_style/new_style)
new_style.on_apply(src)
/obj/item/kinetic_crusher/glaive/gauntlets/ComponentInitialize()
. = ..()
@@ -265,7 +286,7 @@
. = ..()
if(isliving(attacker))
var/mob/living/liv_atk = attacker
if(liv_atk.mob_size >= MOB_SIZE_LARGE && !ismegafauna(liv_atk))
if(liv_atk.mob_size >= MOB_SIZE_LARGE) // are you goated with the sauce
liv_atk.apply_status_effect(STATUS_EFFECT_GAUNTLET_CONC)
/obj/item/kinetic_crusher/glaive/gauntlets/update_icon_state()
@@ -274,6 +295,32 @@
else
item_state = "crusher[wielded]-fist"
/obj/item/kinetic_crusher/glaive/gauntlets/attack(mob/living/target, mob/living/carbon/user)
..()
if((combo_on_anything || target.mob_size >= MOB_SIZE_LARGE) && wielded)
switch(user.a_intent)
if(INTENT_DISARM)
add_to_streak("D", user, target)
if(INTENT_GRAB)
add_to_streak("G", user, target)
if(INTENT_HARM)
add_to_streak("H", user, target)
active_style.check_streak(user, target)
/obj/item/kinetic_crusher/glaive/gauntlets/proc/add_to_streak(element,mob/living/carbon/user, mob/living/target)
if(target != current_target)
reset_streak(target, user)
streak = streak+element
if(length(streak) > max_streak_length)
streak = copytext(streak, 1 + length(streak[1]))
user?.hud_used?.combo_display.update_icon_state(streak)
return
/obj/item/kinetic_crusher/glaive/gauntlets/proc/reset_streak(mob/living/new_target, mob/living/carbon/user)
current_target = new_target
streak = ""
user?.hud_used?.combo_display.update_icon_state(streak)
//destablizing force
/obj/item/projectile/destabilizer
name = "destabilizing force"
+1
View File
@@ -77,6 +77,7 @@
new /datum/data/mining_equipment("Premium Accelerator", /obj/item/gun/energy/kinetic_accelerator/premiumka, 8000),
new /datum/data/mining_equipment("Premium Kinetic Melee Kit", /obj/item/storage/backpack/duffelbag/mining/glaivekit, 2250),
new /datum/data/mining_equipment("Survival Dagger", /obj/item/kitchen/knife/combat/survival/knuckledagger, 550),
new /datum/data/mining_equipment("Premium KA borg Upgrade", /obj/item/borg/upgrade/premiumka, 8000),
new /datum/data/mining_equipment("Kinetic Destroyer", /obj/item/kinetic_crusher/premiumcrusher, 12000), //boop
)
-146
View File
@@ -1,146 +0,0 @@
/**********************Mint**************************/
/obj/machinery/mineral/mint
name = "coin press"
icon = 'icons/obj/economy.dmi'
icon_state = "coinpress0"
density = TRUE
input_dir = EAST
ui_x = 300
ui_y = 250
needs_item_input = TRUE
var/obj/item/storage/bag/money/bag_to_use
var/produced_coins = 0 // how many coins the machine has made in it's last cycle
var/processing = FALSE
var/chosen = /datum/material/iron //which material will be used to make coins
/obj/machinery/mineral/mint/Initialize(mapload)
. = ..()
AddComponent(/datum/component/material_container, list(
/datum/material/iron,
/datum/material/plasma,
/datum/material/silver,
/datum/material/gold,
/datum/material/uranium,
/datum/material/titanium,
/datum/material/diamond,
/datum/material/bananium,
/datum/material/adamantine,
/datum/material/mythril,
/datum/material/plastic,
/datum/material/runite
), MINERAL_MATERIAL_AMOUNT * 75, FALSE, /obj/item/stack)
chosen = SSmaterials.GetMaterialRef(chosen)
/obj/machinery/mineral/mint/pickup_item(datum/source, atom/movable/target, atom/oldLoc)
if(QDELETED(target))
return
if(!istype(target, /obj/item/stack))
return
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
var/obj/item/stack/S = target
if(materials.insert_item(S))
qdel(S)
/obj/machinery/mineral/mint/process()
if(processing)
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
var/datum/material/M = chosen
if(!M)
processing = FALSE
icon_state = "coinpress0"
return
icon_state = "coinpress1"
var/coin_mat = MINERAL_MATERIAL_AMOUNT
for(var/sheets in 1 to 2)
if(materials.use_amount_mat(coin_mat, chosen))
for(var/coin_to_make in 1 to 5)
create_coins()
else
var/found_new = FALSE
for(var/datum/material/inserted_material in materials.materials)
var/amount = materials.get_material_amount(inserted_material)
if(amount)
chosen = inserted_material
found_new = TRUE
if(!found_new)
processing = FALSE
else
STOP_PROCESSING(SSmachines, src)
icon_state = "coinpress0"
/obj/machinery/mineral/mint/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "Mint", name)
ui.open()
/obj/machinery/mineral/mint/ui_data()
var/list/data = list()
data["inserted_materials"] = list()
data["chosen_material"] = null
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
for(var/datum/material/inserted_material in materials.materials)
var/amount = materials.get_material_amount(inserted_material)
if(!amount)
continue
data["inserted_materials"] += list(list(
"material" = inserted_material.name,
"amount" = amount,
))
if(chosen == inserted_material)
data["chosen_material"] = inserted_material.name
data["produced_coins"] = produced_coins
data["processing"] = processing
return data;
/obj/machinery/mineral/mint/ui_act(action, params, datum/tgui/ui)
. = ..()
if(.)
return
if(action == "startpress")
if (!processing)
produced_coins = 0
processing = TRUE
START_PROCESSING(SSmachines, src)
return TRUE
if (action == "stoppress")
processing = FALSE
STOP_PROCESSING(SSmachines, src)
return TRUE
if (action == "changematerial")
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
for(var/datum/material/mat in materials.materials)
if (params["material_name"] == mat.name)
chosen = mat
return TRUE
/obj/machinery/mineral/mint/proc/create_coins()
set waitfor = FALSE
var/turf/T = get_step(src,output_dir)
var/temp_list = list()
temp_list[chosen] = 400
if(T)
var/obj/item/O = new /obj/item/coin(src)
O.set_custom_materials(temp_list)
if(QDELETED(bag_to_use) || (bag_to_use.loc != T) || !SEND_SIGNAL(bag_to_use, COMSIG_TRY_STORAGE_INSERT, O, null, TRUE)) //important to send the signal so we don't overfill the bag.
bag_to_use = new(src) //make a new bag if we can't find or use the old one.
unload_mineral(bag_to_use) //just forcemove memes.
O.forceMove(bag_to_use) //don't bother sending the signal, the new bag is empty and all that.
SSblackbox.record_feedback("amount", "coins_minted", 1)
produced_coins++
CHECK_TICK