Adds gravityboots, from gravitational anomaly core. (#17788)

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
This commit is contained in:
Qwertytoforty
2022-05-23 10:12:33 -04:00
committed by GitHub
parent 7788cb0cda
commit 1dbfcd97d8
9 changed files with 207 additions and 0 deletions
+13
View File
@@ -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
+166
View File
@@ -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, "<span class='notice'>You poke the gem on [src]. Nothing happens.</span>")
/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)
. += "<span class='notice'>[src] are fully operational!</span>"
. += "<span class='notice'>The boots are [round(cell.percent())]% charged.</span>"
else if(core)
. += "<span class='warning'>It has a gravitational anomaly core installed, but no power cell installed.</span>"
else if(cell)
. += "<span class='warning'>It has a power installed, but no gravitational anomaly core installed.</span>"
else
. += "<span class='warning'>It is missing a gravitational anomaly core and a power cell.</span>"
/obj/item/clothing/shoes/magboots/gravity/attack_self(mob/user)
if(!cell)
to_chat(user, "<span class='warning'>Your boots do not have a power cell!</span>")
return
else if(cell.charge <= power_consumption_rate && !magpulse)
to_chat(user, "<span class='warning'>Your boots do not have enough charge!</span>")
return
if(!core)
to_chat(user, "<span class='warning'>There's no core installed!</span>")
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, "<span class='warning'>[src] has ran out of charge, and turned off!</span>")
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, "<span class='warning'>There's no cell installed!</span>")
return
if(magpulse)
to_chat(user, "<span class='warning'>Turn off the boots first!</span>")
return
if(!I.use_tool(src, user, volume = I.tool_volume))
return
user.put_in_hands(cell)
to_chat(user, "<span class='notice'>You remove [cell] from [src].</span>")
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, "<span class='warning'>[src] already has a cell!</span>")
return
if(!user.unEquip(I))
return
I.forceMove(src)
cell = I
to_chat(user, "<span class='notice'>You install [I] into [src].</span>")
update_icon()
return
if(istype(I, /obj/item/assembly/signaler/anomaly/grav))
if(core)
to_chat(user, "<span class='notice'>[src] already has a [I]!</span>")
return
if(!user.drop_item())
to_chat(user, "<span class='warning'>[I] is stuck to your hand!</span>")
return
to_chat(user, "<span class='notice'>You insert [I] into [src], and [src] starts to warm up.</span>")
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, "<span class='notice'>As [src] are removed, they deactivate.</span>")
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, "<span class='warning'>Your boots do not have enough charge to dash!</span>")
return
else
to_chat(user, "<span class='warning'>Your boots do not have a power cell!</span>")
return
if(!core)
to_chat(user, "<span class='warning'>There's no core installed!</span>")
return
if(recharging_time > world.time)
to_chat(user, "<span class='warning'>The boot's gravitational pulse needs to recharge still!</span>")
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("<span class='warning'>[usr] dashes forward into the air!</span>")
recharging_time = world.time + recharging_rate
cell.use(dash_cost)
else
to_chat(user, "<span class='warning'>Something prevents you from dashing forward!</span>")
+17
View File
@@ -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("<span class='danger'>[A] [picked_hit_type] [D]!</span>", \
"<span class='userdanger'>[A] [picked_hit_type] you!</span>")
return TRUE
@@ -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")
Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 20 KiB

+1
View File
@@ -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"