|
|
|
@@ -13,9 +13,10 @@
|
|
|
|
|
//Also, I should probably add in some kind of limiting mechanic but I really don't like having to refill this all the time, expecially as it will be NODROP_1.
|
|
|
|
|
//Apparently due to code limitations you have to detect mob movement with.. shoes.
|
|
|
|
|
//The object that handles the flying itself - FLIGHT PACK --------------------------------------------------------------------------------------
|
|
|
|
|
/obj/item/device/flightpack
|
|
|
|
|
/obj/item/flightpack
|
|
|
|
|
name = "flight pack"
|
|
|
|
|
desc = "An advanced back-worn system that has dual ion engines powerful enough to grant a humanoid flight. Contains an internal self-recharging high-current capacitor for short, powerful boosts."
|
|
|
|
|
icon = 'icons/obj/device.dmi'
|
|
|
|
|
icon_state = FLIGHTPACK_SPRITE_BASE
|
|
|
|
|
item_state = FLIGHTPACK_SPRITE_BASE
|
|
|
|
|
actions_types = list(/datum/action/item_action/flightpack/toggle_flight, /datum/action/item_action/flightpack/engage_boosters, /datum/action/item_action/flightpack/toggle_stabilizers, /datum/action/item_action/flightpack/change_power, /datum/action/item_action/flightpack/toggle_airbrake)
|
|
|
|
@@ -99,7 +100,7 @@
|
|
|
|
|
var/afterForceMove = FALSE
|
|
|
|
|
var/datum/component/mobhook
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/changeWearer(mob/changeto)
|
|
|
|
|
/obj/item/flightpack/proc/changeWearer(mob/changeto)
|
|
|
|
|
if(wearer)
|
|
|
|
|
LAZYREMOVE(wearer.user_movement_hooks, src)
|
|
|
|
|
wearer = null
|
|
|
|
@@ -111,7 +112,7 @@
|
|
|
|
|
cached_pull = changeto.pulling
|
|
|
|
|
mobhook = changeto.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED), CALLBACK(src, .proc/on_mob_move, changeto))
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/Initialize()
|
|
|
|
|
/obj/item/flightpack/Initialize()
|
|
|
|
|
ion_trail = new
|
|
|
|
|
ion_trail.set_up(src)
|
|
|
|
|
START_PROCESSING(SSflightpacks, src)
|
|
|
|
@@ -120,7 +121,7 @@
|
|
|
|
|
update_icon()
|
|
|
|
|
..()
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/full/Initialize()
|
|
|
|
|
/obj/item/flightpack/full/Initialize()
|
|
|
|
|
part_manip = new /obj/item/stock_parts/manipulator/pico(src)
|
|
|
|
|
part_scan = new /obj/item/stock_parts/scanning_module/phasic(src)
|
|
|
|
|
part_cap = new /obj/item/stock_parts/capacitor/super(src)
|
|
|
|
@@ -128,7 +129,7 @@
|
|
|
|
|
part_bin = new /obj/item/stock_parts/matter_bin/super(src)
|
|
|
|
|
..()
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/usermessage(message, span = "boldnotice", mob/mob_override = null)
|
|
|
|
|
/obj/item/flightpack/proc/usermessage(message, span = "boldnotice", mob/mob_override = null)
|
|
|
|
|
var/mob/targ = wearer
|
|
|
|
|
if(ismob(loc))
|
|
|
|
|
targ = loc
|
|
|
|
@@ -138,7 +139,7 @@
|
|
|
|
|
return
|
|
|
|
|
to_chat(targ, "[icon2html(src, targ)]<span class='[span]'>|[message]</span>")
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/sync_processing(datum/controller/subsystem/processing/flightpacks/FPS)
|
|
|
|
|
/obj/item/flightpack/proc/sync_processing(datum/controller/subsystem/processing/flightpacks/FPS)
|
|
|
|
|
processing_mode = FPS.flightsuit_processing
|
|
|
|
|
if(processing_mode == FLIGHTSUIT_PROCESSING_NONE)
|
|
|
|
|
momentum_x = 0
|
|
|
|
@@ -150,7 +151,7 @@
|
|
|
|
|
boost = FALSE
|
|
|
|
|
update_slowdown()
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/update_parts()
|
|
|
|
|
/obj/item/flightpack/proc/update_parts()
|
|
|
|
|
boost_chargerate = initial(boost_chargerate)
|
|
|
|
|
boost_drain = initial(boost_drain)
|
|
|
|
|
powersetting_high = initial(powersetting_high)
|
|
|
|
@@ -172,7 +173,7 @@
|
|
|
|
|
stabilizer_decay_amount = scan*3.5
|
|
|
|
|
airbrake_decay_amount = manip*8
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/Destroy()
|
|
|
|
|
/obj/item/flightpack/Destroy()
|
|
|
|
|
if(suit)
|
|
|
|
|
delink_suit()
|
|
|
|
|
changeWearer()
|
|
|
|
@@ -187,7 +188,7 @@
|
|
|
|
|
STOP_PROCESSING(SSflightpacks, src)
|
|
|
|
|
. = ..()
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/emp_act(severity)
|
|
|
|
|
/obj/item/flightpack/emp_act(severity)
|
|
|
|
|
var/damage = severity == 1 ? emp_strong_damage : emp_weak_damage
|
|
|
|
|
if(emp_damage <= (emp_disable_threshold * 1.5))
|
|
|
|
|
emp_damage += damage
|
|
|
|
@@ -195,7 +196,7 @@
|
|
|
|
|
return ..()
|
|
|
|
|
|
|
|
|
|
//Proc to change amount of momentum the wearer has, or dampen all momentum by a certain amount.
|
|
|
|
|
/obj/item/device/flightpack/proc/adjust_momentum(amountx, amounty, reduce_amount_total = 0)
|
|
|
|
|
/obj/item/flightpack/proc/adjust_momentum(amountx, amounty, reduce_amount_total = 0)
|
|
|
|
|
if(reduce_amount_total != 0)
|
|
|
|
|
if(momentum_x > 0)
|
|
|
|
|
momentum_x = CLAMP(momentum_x - reduce_amount_total, 0, momentum_max)
|
|
|
|
@@ -210,7 +211,7 @@
|
|
|
|
|
calculate_momentum_speed()
|
|
|
|
|
|
|
|
|
|
//The wearer has momentum left. Move them and take some away, while negating the momentum that moving the wearer would gain. Or force the wearer to lose control if they are incapacitated.
|
|
|
|
|
/obj/item/device/flightpack/proc/momentum_drift()
|
|
|
|
|
/obj/item/flightpack/proc/momentum_drift()
|
|
|
|
|
if(!flight || !wearer || (momentum_speed == 0))
|
|
|
|
|
return FALSE
|
|
|
|
|
else if(!wearer.canmove)
|
|
|
|
@@ -235,7 +236,7 @@
|
|
|
|
|
if(prob(emp_damage * 15))
|
|
|
|
|
step(wearer, pick(GLOB.alldirs))
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/on_mob_move(mob/mob, turf/oldLoc, dir, forced)
|
|
|
|
|
/obj/item/flightpack/proc/on_mob_move(mob/mob, turf/oldLoc, dir, forced)
|
|
|
|
|
if(forced)
|
|
|
|
|
if(cached_pull && istype(oldLoc) && (get_dist(oldLoc, loc) <= 1) && !oldLoc.density)
|
|
|
|
|
cached_pull.forceMove(oldLoc)
|
|
|
|
@@ -254,7 +255,7 @@
|
|
|
|
|
if(flight)
|
|
|
|
|
ion_trail.generate_effect()
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/intercept_user_move(dir, mob, newLoc, oldLoc)
|
|
|
|
|
/obj/item/flightpack/intercept_user_move(dir, mob, newLoc, oldLoc)
|
|
|
|
|
if(!flight)
|
|
|
|
|
return
|
|
|
|
|
var/momentum_increment = momentum_gain
|
|
|
|
@@ -275,7 +276,7 @@
|
|
|
|
|
adjust_momentum(-momentum_increment, 0)
|
|
|
|
|
|
|
|
|
|
//Make the wearer lose some momentum.
|
|
|
|
|
/obj/item/device/flightpack/proc/momentum_decay()
|
|
|
|
|
/obj/item/flightpack/proc/momentum_decay()
|
|
|
|
|
var/amt = momentum_passive_loss
|
|
|
|
|
brake? (amt += airbrake_decay_amount) : 0
|
|
|
|
|
gravity? (amt += gravity_decay_amount) : 0
|
|
|
|
@@ -284,7 +285,7 @@
|
|
|
|
|
adjust_momentum(0, 0, amt)
|
|
|
|
|
|
|
|
|
|
//Check for gravity, air pressure, and whether this is still linked to a suit. Also, resync the flightpack/flight suit every minute.
|
|
|
|
|
/obj/item/device/flightpack/proc/check_conditions()
|
|
|
|
|
/obj/item/flightpack/proc/check_conditions()
|
|
|
|
|
if(flight && (!assembled || !wearer || (!suit && requires_suit)))
|
|
|
|
|
disable_flight(TRUE)
|
|
|
|
|
var/turf/T = get_turf(src)
|
|
|
|
@@ -302,7 +303,7 @@
|
|
|
|
|
usermessage("Warning: Sensor data is not being recieved from flight shoes. Stabilizers and airbrake modules deactivated!", "boldwarning")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/process()
|
|
|
|
|
/obj/item/flightpack/process()
|
|
|
|
|
if(processing_mode == FLIGHTSUIT_PROCESSING_NONE)
|
|
|
|
|
return FALSE
|
|
|
|
|
check_conditions()
|
|
|
|
@@ -311,10 +312,10 @@
|
|
|
|
|
handle_boost()
|
|
|
|
|
handle_damage()
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/update_slowdown()
|
|
|
|
|
/obj/item/flightpack/proc/update_slowdown()
|
|
|
|
|
flight? (slowdown = slowdown_air) : (slowdown = slowdown_ground)
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/handle_damage()
|
|
|
|
|
/obj/item/flightpack/proc/handle_damage()
|
|
|
|
|
if(emp_damage)
|
|
|
|
|
emp_damage = CLAMP(emp_damage-emp_heal_amount, 0, emp_disable_threshold * 10)
|
|
|
|
|
if(emp_damage >= emp_disable_threshold)
|
|
|
|
@@ -332,7 +333,7 @@
|
|
|
|
|
if(flight)
|
|
|
|
|
disable_flight(TRUE)
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/update_icon()
|
|
|
|
|
/obj/item/flightpack/update_icon()
|
|
|
|
|
if(!flight)
|
|
|
|
|
icon_state = "[FLIGHTPACK_SPRITE_BASE][FLIGHTPACK_SPRITE_OFF_APPEND]"
|
|
|
|
|
item_state = "[FLIGHTPACK_SPRITE_BASE][FLIGHTPACK_SPRITE_OFF_APPEND]"
|
|
|
|
@@ -347,7 +348,7 @@
|
|
|
|
|
wearer.update_inv_wear_suit()
|
|
|
|
|
wearer.update_inv_back()
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/handle_boost()
|
|
|
|
|
/obj/item/flightpack/proc/handle_boost()
|
|
|
|
|
if(boost)
|
|
|
|
|
boost_charge = CLAMP(boost_charge-boost_drain, 0, boost_maxcharge)
|
|
|
|
|
if(boost_charge < 1)
|
|
|
|
@@ -355,13 +356,13 @@
|
|
|
|
|
if(boost_charge < boost_maxcharge)
|
|
|
|
|
boost_charge = CLAMP(boost_charge+boost_chargerate, 0, boost_maxcharge)
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/cycle_power()
|
|
|
|
|
/obj/item/flightpack/proc/cycle_power()
|
|
|
|
|
powersetting < powersetting_high? (powersetting++) : (powersetting = 1)
|
|
|
|
|
momentum_gain = powersetting * 10
|
|
|
|
|
usermessage("Engine output set to [momentum_gain].")
|
|
|
|
|
momentum_drift_coeff = ((momentum_gain)*(drift_tolerance*1.1))/momentum_max
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/crash_damage(density, anchored, speed, victim_name)
|
|
|
|
|
/obj/item/flightpack/proc/crash_damage(density, anchored, speed, victim_name)
|
|
|
|
|
var/crashmessagesrc = "<span class='userdanger'>[wearer] violently crashes into [victim_name], "
|
|
|
|
|
var/userdamage = 10 - stabilizer * 3 - part_bin.rating - part_scan.rating * part_manip.rating + anchored * 2 + boost * 2 + speed * 2
|
|
|
|
|
if(userdamage > 0)
|
|
|
|
@@ -371,13 +372,13 @@
|
|
|
|
|
crashmessagesrc += "but luckily [wearer]'s impact was absorbed by their suit's stabilizers!</span>"
|
|
|
|
|
wearer.visible_message(crashmessagesrc)
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/userknockback(density, anchored, speed, dir)
|
|
|
|
|
/obj/item/flightpack/proc/userknockback(density, anchored, speed, dir)
|
|
|
|
|
dir = turn(dir, 180)
|
|
|
|
|
var/turf/target = get_edge_target_turf(get_turf(wearer), dir)
|
|
|
|
|
wearer.visible_message("[wearer] is knocked flying by the impact!")
|
|
|
|
|
wearer.throw_at(target, speed * 2 + density * 2 + anchored * 2, 2, wearer)
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/flight_impact(atom/impacted_atom, crashdir) //Yes, victim.
|
|
|
|
|
/obj/item/flightpack/proc/flight_impact(atom/impacted_atom, crashdir) //Yes, victim.
|
|
|
|
|
if(!flight || (impacted_atom == wearer) || crashing || (processing_mode == FLIGHTSUIT_PROCESSING_NONE))
|
|
|
|
|
return FALSE
|
|
|
|
|
crashing = TRUE
|
|
|
|
@@ -421,19 +422,19 @@
|
|
|
|
|
losecontrol(knockdown = FALSE, move = FALSE)
|
|
|
|
|
crashing = FALSE
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/door_pass(obj/structure/mineral_door/door)
|
|
|
|
|
/obj/item/flightpack/proc/door_pass(obj/structure/mineral_door/door)
|
|
|
|
|
INVOKE_ASYNC(door, /obj/structure/mineral_door.proc/Open)
|
|
|
|
|
var/turf/T = get_turf(door)
|
|
|
|
|
wearer.forceMove(T)
|
|
|
|
|
wearer.visible_message("<span class='boldnotice'>[wearer] rolls to their sides and slips past [door]!</span>")
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/crash_grille(obj/structure/grille/target)
|
|
|
|
|
/obj/item/flightpack/proc/crash_grille(obj/structure/grille/target)
|
|
|
|
|
target.hitby(wearer)
|
|
|
|
|
target.take_damage(60, BRUTE, "melee", 1)
|
|
|
|
|
if(wearer.Move(target.loc))
|
|
|
|
|
wearer.visible_message("<span class='warning'>[wearer] smashes straight past [target]!</span>")
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/airlock_pass(obj/machinery/door/A)
|
|
|
|
|
/obj/item/flightpack/proc/airlock_pass(obj/machinery/door/A)
|
|
|
|
|
var/nopass = FALSE
|
|
|
|
|
if(!A.density)
|
|
|
|
|
return TRUE
|
|
|
|
@@ -450,7 +451,7 @@
|
|
|
|
|
wearer.forceMove(target)
|
|
|
|
|
return !nopass
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/atom_impact(atom/movable/victim, power, direction)
|
|
|
|
|
/obj/item/flightpack/proc/atom_impact(atom/movable/victim, power, direction)
|
|
|
|
|
if(!victim)
|
|
|
|
|
return FALSE
|
|
|
|
|
if(!victim.anchored)
|
|
|
|
@@ -466,7 +467,7 @@
|
|
|
|
|
var/obj/O = victim
|
|
|
|
|
O.take_damage(power * 14)
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/losecontrol(knockdown = FALSE, move = TRUE)
|
|
|
|
|
/obj/item/flightpack/proc/losecontrol(knockdown = FALSE, move = TRUE)
|
|
|
|
|
usermessage("Warning: Control system not responding. Deactivating!", "boldwarning")
|
|
|
|
|
if(wearer)
|
|
|
|
|
wearer.visible_message("<span class='warning'>[wearer]'s flight suit abruptly shuts off and they lose control!</span>")
|
|
|
|
@@ -485,7 +486,7 @@
|
|
|
|
|
if(flight)
|
|
|
|
|
disable_flight(FALSE)
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/enable_flight(forced = FALSE)
|
|
|
|
|
/obj/item/flightpack/proc/enable_flight(forced = FALSE)
|
|
|
|
|
if(!forced)
|
|
|
|
|
if(disabled)
|
|
|
|
|
usermessage("Internal systems recalibrating. Unable to safely proceed.", "boldwarning")
|
|
|
|
@@ -505,7 +506,7 @@
|
|
|
|
|
update_icon()
|
|
|
|
|
ion_trail.start()
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/disable_flight(forced = FALSE)
|
|
|
|
|
/obj/item/flightpack/proc/disable_flight(forced = FALSE)
|
|
|
|
|
if(forced)
|
|
|
|
|
losecontrol(knockdown = TRUE)
|
|
|
|
|
return TRUE
|
|
|
|
@@ -536,23 +537,23 @@
|
|
|
|
|
addtimer(CALLBACK(src, .proc/enable_safe), 50)
|
|
|
|
|
return FALSE
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/enable_safe()
|
|
|
|
|
/obj/item/flightpack/proc/enable_safe()
|
|
|
|
|
if(override_safe)
|
|
|
|
|
override_safe = FALSE
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/dropped(mob/wearer)
|
|
|
|
|
/obj/item/flightpack/dropped(mob/wearer)
|
|
|
|
|
changeWearer()
|
|
|
|
|
..()
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/item_action_slot_check(slot)
|
|
|
|
|
/obj/item/flightpack/item_action_slot_check(slot)
|
|
|
|
|
if(slot == SLOT_BACK)
|
|
|
|
|
return TRUE
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/equipped(mob/user, slot)
|
|
|
|
|
/obj/item/flightpack/equipped(mob/user, slot)
|
|
|
|
|
changeWearer(user)
|
|
|
|
|
..()
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/calculate_momentum_speed()
|
|
|
|
|
/obj/item/flightpack/proc/calculate_momentum_speed()
|
|
|
|
|
if(abs(momentum_x) >= (momentum_crash_coeff*momentum_max)) //Calculate X
|
|
|
|
|
momentum_speed_x = 3
|
|
|
|
|
else if(abs(momentum_x) >= (momentum_impact_coeff*momentum_max))
|
|
|
|
@@ -571,10 +572,10 @@
|
|
|
|
|
momentum_speed_y = 0
|
|
|
|
|
momentum_speed = max(momentum_speed_x, momentum_speed_y)
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/item_action_slot_check(slot)
|
|
|
|
|
/obj/item/flightpack/item_action_slot_check(slot)
|
|
|
|
|
return slot == slot_back
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/enable_stabilizers()
|
|
|
|
|
/obj/item/flightpack/proc/enable_stabilizers()
|
|
|
|
|
if(requires_suit && suit && !suit.deployedshoes)
|
|
|
|
|
usermessage("Stabilizers requires flight shoes to be attached and deployed!", "boldwarning")
|
|
|
|
|
return FALSE
|
|
|
|
@@ -582,14 +583,14 @@
|
|
|
|
|
stabilizer = TRUE
|
|
|
|
|
return TRUE
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/disable_stabilizers()
|
|
|
|
|
/obj/item/flightpack/proc/disable_stabilizers()
|
|
|
|
|
if(wearer)
|
|
|
|
|
if(brake)
|
|
|
|
|
disable_airbrake()
|
|
|
|
|
usermessage("Deactivating stabilization controllers!", "boldwarning")
|
|
|
|
|
stabilizer = FALSE
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/activate_booster()
|
|
|
|
|
/obj/item/flightpack/proc/activate_booster()
|
|
|
|
|
if(!flight)
|
|
|
|
|
usermessage("Error: Engines offline!", "boldwarning")
|
|
|
|
|
return FALSE
|
|
|
|
@@ -601,13 +602,13 @@
|
|
|
|
|
update_slowdown()
|
|
|
|
|
update_icon()
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/deactivate_booster()
|
|
|
|
|
/obj/item/flightpack/proc/deactivate_booster()
|
|
|
|
|
usermessage("Boosters disengaged!")
|
|
|
|
|
boost = FALSE
|
|
|
|
|
update_slowdown()
|
|
|
|
|
update_icon()
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/enable_airbrake()
|
|
|
|
|
/obj/item/flightpack/proc/enable_airbrake()
|
|
|
|
|
if(wearer)
|
|
|
|
|
if(!stabilizer && !enable_stabilizers())
|
|
|
|
|
usermessage("Airbrake deployment: Stabilizer Errored.", "boldwarning")
|
|
|
|
@@ -616,13 +617,13 @@
|
|
|
|
|
brake = TRUE
|
|
|
|
|
update_slowdown()
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/disable_airbrake()
|
|
|
|
|
/obj/item/flightpack/proc/disable_airbrake()
|
|
|
|
|
if(wearer)
|
|
|
|
|
usermessage("Airbrakes retracted!", "boldwarning")
|
|
|
|
|
brake = FALSE
|
|
|
|
|
update_slowdown()
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/relink_suit(obj/item/clothing/suit/space/hardsuit/flightsuit/F)
|
|
|
|
|
/obj/item/flightpack/proc/relink_suit(obj/item/clothing/suit/space/hardsuit/flightsuit/F)
|
|
|
|
|
if(suit && suit == F)
|
|
|
|
|
return FALSE
|
|
|
|
|
else
|
|
|
|
@@ -633,13 +634,13 @@
|
|
|
|
|
else
|
|
|
|
|
suit = null
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/delink_suit()
|
|
|
|
|
/obj/item/flightpack/proc/delink_suit()
|
|
|
|
|
if(suit)
|
|
|
|
|
if(suit.pack && suit.pack == src)
|
|
|
|
|
suit.pack = null
|
|
|
|
|
suit = null
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/attackby(obj/item/I, mob/user, params)
|
|
|
|
|
/obj/item/flightpack/attackby(obj/item/I, mob/user, params)
|
|
|
|
|
var/const/SuccessMessage = " has been successfully installed into systems."
|
|
|
|
|
var/changed = FALSE
|
|
|
|
|
if(istype(I, /obj/item/stock_parts))
|
|
|
|
@@ -689,13 +690,13 @@
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
/mob/living/carbon/get_flightpack()
|
|
|
|
|
var/obj/item/device/flightpack/F = back
|
|
|
|
|
var/obj/item/flightpack/F = back
|
|
|
|
|
if(istype(F))
|
|
|
|
|
return F
|
|
|
|
|
else
|
|
|
|
|
return FALSE
|
|
|
|
|
|
|
|
|
|
/obj/item/device/flightpack/proc/allow_thrust(amount)
|
|
|
|
|
/obj/item/flightpack/proc/allow_thrust(amount)
|
|
|
|
|
if(flight)
|
|
|
|
|
return TRUE
|
|
|
|
|
|
|
|
|
@@ -707,7 +708,7 @@
|
|
|
|
|
icon_state = "flightshoes"
|
|
|
|
|
item_state = "flightshoes_mob"
|
|
|
|
|
var/obj/item/clothing/suit/space/hardsuit/flightsuit/suit = null
|
|
|
|
|
var/obj/item/device/flightpack/pack = null
|
|
|
|
|
var/obj/item/flightpack/pack = null
|
|
|
|
|
var/mob/living/carbon/human/wearer = null
|
|
|
|
|
var/active = FALSE
|
|
|
|
|
permeability_coefficient = 0.01
|
|
|
|
@@ -764,7 +765,7 @@
|
|
|
|
|
armor = list("melee" = 20, "bullet" = 20, "laser" = 20, "energy" = 10, "bomb" = 30, "bio" = 100, "rad" = 75, "fire" = 100, "acid" = 100)
|
|
|
|
|
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
|
|
|
|
|
var/locked_strip_delay = 80
|
|
|
|
|
var/obj/item/device/flightpack/pack = null
|
|
|
|
|
var/obj/item/flightpack/pack = null
|
|
|
|
|
var/obj/item/clothing/shoes/flightshoes/shoes = null
|
|
|
|
|
var/mob/living/carbon/human/user = null
|
|
|
|
|
var/deployedpack = FALSE
|
|
|
|
@@ -950,7 +951,7 @@
|
|
|
|
|
|
|
|
|
|
/obj/item/clothing/suit/space/hardsuit/flightsuit/proc/makepack()
|
|
|
|
|
if(!pack)
|
|
|
|
|
pack = new /obj/item/device/flightpack/full(src)
|
|
|
|
|
pack = new /obj/item/flightpack/full(src)
|
|
|
|
|
pack.relink_suit(src)
|
|
|
|
|
|
|
|
|
|
/obj/item/clothing/suit/space/hardsuit/flightsuit/proc/makeshoes()
|
|
|
|
@@ -977,7 +978,7 @@
|
|
|
|
|
pack = null
|
|
|
|
|
usermessage("You detach the flightpack.")
|
|
|
|
|
|
|
|
|
|
/obj/item/clothing/suit/space/hardsuit/flightsuit/proc/attach_pack(obj/item/device/flightpack/F)
|
|
|
|
|
/obj/item/clothing/suit/space/hardsuit/flightsuit/proc/attach_pack(obj/item/flightpack/F)
|
|
|
|
|
F.forceMove(src)
|
|
|
|
|
pack = F
|
|
|
|
|
pack.relink_suit(src)
|
|
|
|
@@ -1037,8 +1038,8 @@
|
|
|
|
|
return FALSE
|
|
|
|
|
detach_shoes()
|
|
|
|
|
return TRUE
|
|
|
|
|
else if(istype(I, /obj/item/device/flightpack))
|
|
|
|
|
var/obj/item/device/flightpack/F = I
|
|
|
|
|
else if(istype(I, /obj/item/flightpack))
|
|
|
|
|
var/obj/item/flightpack/F = I
|
|
|
|
|
if(pack)
|
|
|
|
|
usermessage("[src] already has a flightpack installed!", "boldwarning")
|
|
|
|
|
return FALSE
|
|
|
|
|