diff --git a/code/datums/action.dm b/code/datums/action.dm index 0d13981f658..76a1ec8304e 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -442,6 +442,19 @@ button_icon_state = "jetboot" use_itemicon = FALSE + +/datum/action/item_action/gravity_jump + name = "Gravity jump" + desc = "Directs a pulse of gravity in front of the user, pulling them foward rapidly." + +/datum/action/item_action/gravity_jump/Trigger() + if(!IsAvailable()) + return FALSE + + var/obj/item/clothing/shoes/magboots/gravity/G = target + G.dash(usr) + + ///prset for organ actions /datum/action/item_action/organ_action check_flags = AB_CHECK_CONSCIOUS diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm index 1477e4673ad..f10e4e236c6 100644 --- a/code/modules/clothing/shoes/magboots.dm +++ b/code/modules/clothing/shoes/magboots.dm @@ -14,6 +14,10 @@ put_on_delay = 70 resistance_flags = FIRE_PROOF +/obj/item/clothing/shoes/magboots/Destroy() + STOP_PROCESSING(SSobj, src) + return ..() + /obj/item/clothing/shoes/magboots/atmos desc = "Magnetic boots, made to withstand gusts of space wind over 500kmph." name = "atmospheric magboots" @@ -23,9 +27,11 @@ /obj/item/clothing/shoes/magboots/attack_self(mob/user) if(magpulse) + START_PROCESSING(SSobj, src) //Gravboots flags &= ~NOSLIP slowdown = slowdown_passive else + STOP_PROCESSING(SSobj, src) flags |= NOSLIP slowdown = slowdown_active magpulse = !magpulse @@ -126,3 +132,163 @@ ..() else to_chat(user, "You poke the gem on [src]. Nothing happens.") + + +/obj/item/clothing/shoes/magboots/gravity + name = "gravitational boots" + desc = "These experimental boots try to get around the restrictions of magboots by installing miniture gravitational generators in the soles. Sadly, power hungry, and needs a gravitational anomaly core." + icon_state = "gravboots0" + origin_tech = "materials=6;magnets=6;engineering=6" + actions_types = list(/datum/action/item_action/toggle, /datum/action/item_action/gravity_jump) //In other news, combining magboots with jumpboots is a mess + strip_delay = 10 SECONDS + put_on_delay = 10 SECONDS + slowdown_active = SHOES_SLOWDOWN + magboot_state = "gravboots" + magpulse_name = "micro gravitational traction system" + var/datum/martial_art/grav_stomp/style = new //Only works with core and cell installed. + var/jumpdistance = 5 + var/jumpspeed = 3 + var/recharging_rate = 6 SECONDS + var/recharging_time = 0 // Time until next dash + var/dash_cost = 1000 // Cost to dash. + var/power_consumption_rate = 30 // How much power is used by the boots each cycle when magboots are active + var/obj/item/assembly/signaler/anomaly/grav/core = null + var/obj/item/stock_parts/cell/cell = null + +/obj/item/clothing/shoes/magboots/gravity/Destroy() + QDEL_NULL(style) + QDEL_NULL(cell) + QDEL_NULL(core) + return ..() + +/obj/item/clothing/shoes/magboots/gravity/examine(mob/user) + . = ..() + if(core && cell) + . += "[src] are fully operational!" + . += "The boots are [round(cell.percent())]% charged." + else if(core) + . += "It has a gravitational anomaly core installed, but no power cell installed." + else if(cell) + . += "It has a power installed, but no gravitational anomaly core installed." + else + . += "It is missing a gravitational anomaly core and a power cell." + +/obj/item/clothing/shoes/magboots/gravity/attack_self(mob/user) + if(!cell) + to_chat(user, "Your boots do not have a power cell!") + return + else if(cell.charge <= power_consumption_rate && !magpulse) + to_chat(user, "Your boots do not have enough charge!") + return + if(!core) + to_chat(user, "There's no core installed!") + return + + ..() + +/obj/item/clothing/shoes/magboots/gravity/process() + if(!cell) //There should be a cell here, but safety first + return + if(cell.charge <= power_consumption_rate * 2) + if(ishuman(loc)) + var/mob/living/carbon/human/user = loc + to_chat(user, "[src] has ran out of charge, and turned off!") + attack_self(user) + else + cell.use(power_consumption_rate) + +/obj/item/clothing/shoes/magboots/gravity/screwdriver_act(mob/living/user, obj/item/I) + if(!cell) + to_chat(user, "There's no cell installed!") + return + + if(magpulse) + to_chat(user, "Turn off the boots first!") + return + + if(!I.use_tool(src, user, volume = I.tool_volume)) + return + + user.put_in_hands(cell) + to_chat(user, "You remove [cell] from [src].") + cell.update_icon() + cell = null + update_icon() + +/obj/item/clothing/shoes/magboots/gravity/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/stock_parts/cell)) + if(cell) + to_chat(user, "[src] already has a cell!") + return + if(!user.unEquip(I)) + return + I.forceMove(src) + cell = I + to_chat(user, "You install [I] into [src].") + update_icon() + return + + if(istype(I, /obj/item/assembly/signaler/anomaly/grav)) + if(core) + to_chat(user, "[src] already has a [I]!") + return + if(!user.drop_item()) + to_chat(user, "[I] is stuck to your hand!") + return + to_chat(user, "You insert [I] into [src], and [src] starts to warm up.") + I.forceMove(src) + core = I + else + return ..() + +/obj/item/clothing/shoes/magboots/gravity/equipped(mob/user, slot) + ..() + if(!ishuman(user)) + return + if(slot == slot_shoes && cell && core) + style.teach(user, TRUE) + +/obj/item/clothing/shoes/magboots/gravity/dropped(mob/user) + ..() + if(!ishuman(user)) + return + var/mob/living/carbon/human/H = user + if(H.get_item_by_slot(slot_shoes) == src) + style.remove(H) + if(magpulse) + to_chat(user, "As [src] are removed, they deactivate.") + attack_self(user) + +/obj/item/clothing/shoes/magboots/gravity/item_action_slot_check(slot) + if(slot == slot_shoes) + return TRUE + +/obj/item/clothing/shoes/magboots/gravity/proc/dash(mob/user, action) + if(!isliving(user)) + return + + if(cell) + if(cell.charge <= dash_cost) + to_chat(user, "Your boots do not have enough charge to dash!") + return + else + to_chat(user, "Your boots do not have a power cell!") + return + + if(!core) + to_chat(user, "There's no core installed!") + return + + if(recharging_time > world.time) + to_chat(user, "The boot's gravitational pulse needs to recharge still!") + return + + var/atom/target = get_edge_target_turf(user, user.dir) //gets the user's direction + + if(user.throw_at(target, jumpdistance, jumpspeed, spin = FALSE, diagonals_first = TRUE)) + playsound(src, 'sound/effects/stealthoff.ogg', 50, 1, 1) + user.visible_message("[usr] dashes forward into the air!") + recharging_time = world.time + recharging_rate + cell.use(dash_cost) + else + to_chat(user, "Something prevents you from dashing forward!") diff --git a/code/modules/martial_arts/grav_stomp.dm b/code/modules/martial_arts/grav_stomp.dm new file mode 100644 index 00000000000..766dceb5b98 --- /dev/null +++ b/code/modules/martial_arts/grav_stomp.dm @@ -0,0 +1,17 @@ +/datum/martial_art/grav_stomp + name = "Gravitational Boots" + +/datum/martial_art/grav_stomp/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D) + MARTIAL_ARTS_ACT_CHECK + add_attack_logs(A, D, "Melee attacked with [src]") + var/picked_hit_type = "kicks" + var/bonus_damage = 10 + if(D.IsWeakened() || D.resting || D.lying) + bonus_damage = 15 + picked_hit_type = "stomps on" + A.do_attack_animation(D, ATTACK_EFFECT_KICK) + playsound(get_turf(D), 'sound/effects/hit_kick.ogg', 50, 1, -1) + D.apply_damage(bonus_damage, BRUTE) + D.visible_message("[A] [picked_hit_type] [D]!", \ + "[A] [picked_hit_type] you!") + return TRUE diff --git a/code/modules/research/designs/equipment_designs.dm b/code/modules/research/designs/equipment_designs.dm index a2527ca6d64..494ad4438c6 100644 --- a/code/modules/research/designs/equipment_designs.dm +++ b/code/modules/research/designs/equipment_designs.dm @@ -311,3 +311,13 @@ build_type = PROTOLATHE materials = list(MAT_METAL = 5000, MAT_PLASMA = 2500, MAT_TITANIUM = 500, MAT_BLUESPACE = 500) category = list("Equipment") + +/datum/design/gravboots + name = "Gravitational Boots" + desc = "Expermimental magboots that use miniture gravity generators instead" + id = "gravboots" + req_tech = list("materials" = 7, "magnets" = 7, "engineering" = 7) + build_type = PROTOLATHE + materials = list(MAT_SILVER = 4000, MAT_TITANIUM = 6000, MAT_URANIUM = 4000, MAT_PLASMA = 4000) + build_path = /obj/item/clothing/shoes/magboots/gravity + category = list("Equipment") diff --git a/icons/mob/clothing/feet.dmi b/icons/mob/clothing/feet.dmi index 8257a4ffe01..c625495655f 100644 Binary files a/icons/mob/clothing/feet.dmi and b/icons/mob/clothing/feet.dmi differ diff --git a/icons/mob/clothing/species/drask/shoes.dmi b/icons/mob/clothing/species/drask/shoes.dmi index 53664dd3d70..683de886583 100644 Binary files a/icons/mob/clothing/species/drask/shoes.dmi and b/icons/mob/clothing/species/drask/shoes.dmi differ diff --git a/icons/mob/clothing/species/vox/shoes.dmi b/icons/mob/clothing/species/vox/shoes.dmi index 400cac578d8..d24ad57b941 100644 Binary files a/icons/mob/clothing/species/vox/shoes.dmi and b/icons/mob/clothing/species/vox/shoes.dmi differ diff --git a/icons/obj/clothing/shoes.dmi b/icons/obj/clothing/shoes.dmi index 9ef3c420c40..2662b32a718 100644 Binary files a/icons/obj/clothing/shoes.dmi and b/icons/obj/clothing/shoes.dmi differ diff --git a/paradise.dme b/paradise.dme index d2a7c2c0e39..fa57896d654 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1760,6 +1760,7 @@ #include "code\modules\martial_arts\adminfu.dm" #include "code\modules\martial_arts\brawling.dm" #include "code\modules\martial_arts\cqc.dm" +#include "code\modules\martial_arts\grav_stomp.dm" #include "code\modules\martial_arts\krav_maga.dm" #include "code\modules\martial_arts\martial.dm" #include "code\modules\martial_arts\mimejutsu.dm"