mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
Jetpack nerf revert, new jetpack implant
This commit is contained in:
+11
-2
@@ -215,8 +215,17 @@
|
||||
/datum/action/item_action/toggle_helmet
|
||||
name = "Toggle Helmet"
|
||||
|
||||
/datum/action/item_action/jetpack_mode
|
||||
name = "Jetpack Mode"
|
||||
/datum/action/item_action/toggle_jetpack
|
||||
name = "Toggle Jetpack"
|
||||
|
||||
/datum/action/item_action/jetpack_stabilization
|
||||
name = "Toggle Jetpack Stabilization"
|
||||
|
||||
/datum/action/item_action/jetpack_stabilization/IsAvailable()
|
||||
var/obj/item/weapon/tank/jetpack/J = target
|
||||
if(!istype(J) || !J.on)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/datum/action/item_action/hands_free
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
item_state = "jetpack"
|
||||
w_class = 4
|
||||
distribute_pressure = ONE_ATMOSPHERE * O2STANDARD
|
||||
actions_types = list(/datum/action/item_action/set_internals, /datum/action/item_action/jetpack_mode)
|
||||
actions_types = list(/datum/action/item_action/set_internals, /datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
|
||||
var/gas_type = "o2"
|
||||
var/on = FALSE
|
||||
var/turbo = FALSE
|
||||
var/stabilizers = FALSE
|
||||
var/datum/effect_system/trail_follow/ion/ion_trail
|
||||
|
||||
/obj/item/weapon/tank/jetpack/New()
|
||||
@@ -20,8 +20,12 @@
|
||||
ion_trail.set_up(src)
|
||||
|
||||
/obj/item/weapon/tank/jetpack/ui_action_click(mob/user, actiontype)
|
||||
if(actiontype == /datum/action/item_action/jetpack_mode)
|
||||
if(actiontype == /datum/action/item_action/toggle_jetpack)
|
||||
cycle(user)
|
||||
else if(actiontype == /datum/action/item_action/jetpack_stabilization)
|
||||
if(on)
|
||||
stabilizers = !stabilizers
|
||||
user << "<span class='notice'>You turn the jetpack stabilization [stabilizers ? "on" : "off"].</span>"
|
||||
else
|
||||
toggle_internals(user)
|
||||
|
||||
@@ -32,14 +36,10 @@
|
||||
|
||||
if(!on)
|
||||
turn_on()
|
||||
user << "<span class='notice'>You turn the thrusters on.</span>"
|
||||
else if(!turbo)
|
||||
turbo = TRUE
|
||||
user << "<span class='notice'>You engage turbo mode.</span>"
|
||||
user << "<span class='notice'>You turn the jetpack on.</span>"
|
||||
else
|
||||
turn_off()
|
||||
turbo = FALSE
|
||||
user << "<span class='notice'>You turn jetpack off.</span>"
|
||||
user << "<span class='notice'>You turn the jetpack off.</span>"
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
@@ -52,6 +52,7 @@
|
||||
|
||||
/obj/item/weapon/tank/jetpack/proc/turn_off()
|
||||
on = FALSE
|
||||
stabilizers = FALSE
|
||||
icon_state = initial(icon_state)
|
||||
ion_trail.stop()
|
||||
|
||||
@@ -114,7 +115,7 @@
|
||||
desc = "A device that will use your internals tank as a gas source for propulsion."
|
||||
icon_state = "jetpack-void"
|
||||
item_state = "jetpack-void"
|
||||
actions_types = list(/datum/action/item_action/jetpack_mode)
|
||||
actions_types = list(/datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
|
||||
var/obj/item/weapon/tank/internals/tank = null
|
||||
|
||||
/obj/item/weapon/tank/jetpack/suit/New()
|
||||
@@ -172,4 +173,4 @@
|
||||
if(!istype(J) && istype(wear_suit, /obj/item/clothing/suit/space/hardsuit))
|
||||
var/obj/item/clothing/suit/space/hardsuit/C = wear_suit
|
||||
J = C.jetpack
|
||||
return J
|
||||
return J
|
||||
|
||||
@@ -363,13 +363,6 @@
|
||||
return "trails_1"
|
||||
return "trails_2"
|
||||
|
||||
var/const/NO_SLIP_WHEN_WALKING = 1
|
||||
var/const/SLIDE = 2
|
||||
var/const/GALOSHES_DONT_HELP = 4
|
||||
/mob/living/carbon/slip(s_amount, w_amount, obj/O, lube)
|
||||
add_logs(src,, "slipped",, "on [O ? O.name : "floor"]")
|
||||
return loc.handle_slip(src, s_amount, w_amount, O, lube)
|
||||
|
||||
/mob/living/carbon/fall(forced)
|
||||
loc.handle_fall(src, forced)//it's loc so it doesn't call the mob's handle_fall which does nothing
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/mob/living/carbon/movement_delay()
|
||||
. = ..()
|
||||
if(legcuffed)
|
||||
. += legcuffed.slowdown
|
||||
|
||||
var/obj/item/organ/internal/cyberimp/chest/thrusters/J = getorganslot("thrusters")
|
||||
if(istype(J) && J.on)
|
||||
. -= 2
|
||||
|
||||
|
||||
var/const/NO_SLIP_WHEN_WALKING = 1
|
||||
var/const/SLIDE = 2
|
||||
var/const/GALOSHES_DONT_HELP = 4
|
||||
|
||||
/mob/living/carbon/slip(s_amount, w_amount, obj/O, lube)
|
||||
add_logs(src,, "slipped",, "on [O ? O.name : "floor"]")
|
||||
return loc.handle_slip(src, s_amount, w_amount, O, lube)
|
||||
|
||||
|
||||
/mob/living/carbon/Process_Spacemove(movement_dir = 0)
|
||||
if(..())
|
||||
return 1
|
||||
if(!isturf(loc))
|
||||
return 0
|
||||
|
||||
// Do we have a jetpack implant (and is it on)?
|
||||
var/obj/item/organ/internal/cyberimp/chest/thrusters/J = getorganslot("thrusters")
|
||||
if(istype(J) && movement_dir && J.allow_thrust(0.01))
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/carbon/Move(NewLoc, direct)
|
||||
. = ..()
|
||||
if(.)
|
||||
if(src.nutrition && src.stat != 2)
|
||||
src.nutrition -= HUNGER_FACTOR/10
|
||||
if(src.m_intent == "run")
|
||||
src.nutrition -= HUNGER_FACTOR/10
|
||||
if((src.disabilities & FAT) && src.m_intent == "run" && src.bodytemperature <= 360)
|
||||
src.bodytemperature += 2
|
||||
@@ -777,14 +777,14 @@
|
||||
|
||||
if(!(H.status_flags & IGNORESLOWDOWN))
|
||||
if(!has_gravity(H))
|
||||
// If there's no gravity we have the option of sanic speed.
|
||||
// If there's no gravity we have the sanic speed of jetpack.
|
||||
var/obj/item/weapon/tank/jetpack/J = H.back
|
||||
var/obj/item/clothing/suit/space/hardsuit/C = H.wear_suit
|
||||
if(!istype(J) && istype(C))
|
||||
J = C.jetpack
|
||||
|
||||
if(istype(J) && J.turbo && J.allow_thrust(0.01, H))
|
||||
. -= 2 // Turbo mode. Gotta go fast.
|
||||
if(istype(J) && J.allow_thrust(0.01, H))
|
||||
. -= 2
|
||||
else
|
||||
var/health_deficiency = (100 - H.health + H.staminaloss)
|
||||
if(health_deficiency >= 40)
|
||||
|
||||
@@ -231,6 +231,17 @@
|
||||
build_path = /obj/item/organ/internal/cyberimp/chest/reviver
|
||||
category = list("Misc", "Medical Designs")
|
||||
|
||||
/datum/design/cyberimp_thrusters
|
||||
name = "Thrusters set implant"
|
||||
desc = "This implant will allow you to use gas from environment or your internals for propulsion in zero-gravity areas."
|
||||
id = "ci-thrusters"
|
||||
req_tech = list("materials" = 7, "programming" = 5, "biotech" = 5, "magnets" = 4, "engineering" = 5)
|
||||
build_type = PROTOLATHE | MECHFAB
|
||||
construction_time = 80
|
||||
materials = list(MAT_METAL = 4000, MAT_GLASS = 2000, MAT_SILVER = 1000, MAT_DIAMOND = 1000)
|
||||
build_path = /obj/item/organ/internal/cyberimp/chest/thrusters
|
||||
category = list("Misc", "Medical Designs")
|
||||
|
||||
|
||||
/////////////////////////////////////////
|
||||
////////////Regular Implants/////////////
|
||||
|
||||
@@ -103,4 +103,94 @@
|
||||
spawn(600 / severity)
|
||||
H.heart_attack = 0
|
||||
if(H.stat == CONSCIOUS)
|
||||
H << "<span class='notice'>You feel your heart beating again!</span>"
|
||||
H << "<span class='notice'>You feel your heart beating again!</span>"
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/thrusters
|
||||
name = "implantable thrusters set"
|
||||
desc = "An implantable set of thruster ports. They use the gas from environment or subject's internals for propulsion in zero-gravity areas. \
|
||||
Unlike regular jetpack, this device has no stablilzation system."
|
||||
slot = "thrusters"
|
||||
icon_state = "imp_jetpack"
|
||||
origin_tech = "materials=6;programming=4;magnets=3;biotech=4;engineering=4"
|
||||
implant_overlay = null
|
||||
implant_color = null
|
||||
actions_types = list(/datum/action/item_action/organ_action/toggle)
|
||||
w_class = 3
|
||||
var/on = 0
|
||||
var/datum/effect_system/trail_follow/ion/ion_trail
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/thrusters/Insert(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
if(!ion_trail)
|
||||
ion_trail = new
|
||||
ion_trail.set_up(M)
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/thrusters/Remove(mob/living/carbon/M, special = 0)
|
||||
if(on)
|
||||
toggle(silent=1)
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/thrusters/ui_action_click()
|
||||
toggle()
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/thrusters/proc/toggle(silent=0)
|
||||
if(!on)
|
||||
if(crit_fail)
|
||||
if(!silent)
|
||||
owner << "<span class='warning'>Your thrusters set seems to be broken!</span>"
|
||||
return 0
|
||||
on = 1
|
||||
if(allow_thrust(0.01))
|
||||
ion_trail.start()
|
||||
if(!silent)
|
||||
owner << "<span class='notice'>You turn your thrusters set on.</span>"
|
||||
else
|
||||
ion_trail.stop()
|
||||
if(!silent)
|
||||
owner << "<span class='notice'>You turn your thrusters set off.</span>"
|
||||
on = 0
|
||||
update_icon()
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/thrusters/update_icon()
|
||||
if(on)
|
||||
icon_state = "imp_jetpack-on"
|
||||
else
|
||||
icon_state = "imp_jetpack"
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/thrusters/proc/allow_thrust(num)
|
||||
if(!on || !owner)
|
||||
return 0
|
||||
|
||||
var/turf/T = get_turf(owner)
|
||||
if(!T) // No more runtimes from being stuck in nullspace.
|
||||
return 0
|
||||
|
||||
// Priority 1: use air from environment.
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
if(environment && environment.return_pressure() > 30)
|
||||
return 1
|
||||
|
||||
// Priority 2: use plasma from internal plasma storage.
|
||||
// (just in case someone would ever use this implant system to make cyber-alien ops with jetpacks and taser arms)
|
||||
if(owner.getPlasma() >= num*100)
|
||||
owner.adjustPlasma(-num*100)
|
||||
return 1
|
||||
|
||||
// Priority 3: use internals tank.
|
||||
var/obj/item/weapon/tank/I = owner.internal
|
||||
if(I && I.air_contents && I.air_contents.total_moles() > num)
|
||||
var/datum/gas_mixture/removed = I.air_contents.remove(num)
|
||||
if(removed.total_moles() > 0.005)
|
||||
T.assume_air(removed)
|
||||
return 1
|
||||
else
|
||||
T.assume_air(removed)
|
||||
|
||||
toggle(silent=1)
|
||||
return 0
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
@@ -1194,6 +1194,7 @@
|
||||
#include "code\modules\mob\living\carbon\carbon.dm"
|
||||
#include "code\modules\mob\living\carbon\carbon_defense.dm"
|
||||
#include "code\modules\mob\living\carbon\carbon_defines.dm"
|
||||
#include "code\modules\mob\living\carbon\carbon_movement.dm"
|
||||
#include "code\modules\mob\living\carbon\death.dm"
|
||||
#include "code\modules\mob\living\carbon\emote.dm"
|
||||
#include "code\modules\mob\living\carbon\examine.dm"
|
||||
|
||||
Reference in New Issue
Block a user