modsuits part 1
This commit is contained in:
committed by
Jerry Wester
parent
792790216d
commit
183b554ed3
+2
-1
@@ -911,7 +911,8 @@
|
||||
user.active_storage.ui_show(user)
|
||||
return TRUE
|
||||
|
||||
/atom/proc/get_dumping_location(obj/item/storage/source,mob/user)
|
||||
///Get the best place to dump the items contained in the source storage item?
|
||||
/atom/proc/get_dumping_location()
|
||||
return null
|
||||
|
||||
//This proc is called on the location of an atom when the atom is Destroy()'d
|
||||
|
||||
@@ -381,7 +381,7 @@
|
||||
/obj/machinery/door/morgue
|
||||
icon = 'icons/obj/doors/doormorgue.dmi'
|
||||
|
||||
/obj/machinery/door/get_dumping_location(obj/item/storage/source,mob/user)
|
||||
/obj/machinery/door/get_dumping_location()
|
||||
return null
|
||||
|
||||
/obj/machinery/door/proc/lock()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/machinery/recharge_station
|
||||
name = "cyborg recharging station"
|
||||
desc = "This device recharges cyborgs and resupplies them with materials."
|
||||
name = "recharging station"
|
||||
desc = "This device recharges energy dependent lifeforms, like cyborgs, ethereals and MODsuit users."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "borgcharger0"
|
||||
density = FALSE
|
||||
|
||||
@@ -10,11 +10,15 @@
|
||||
var/obj/item/clothing/suit/space/suit = null
|
||||
var/obj/item/clothing/head/helmet/space/helmet = null
|
||||
var/obj/item/clothing/mask/mask = null
|
||||
var/obj/item/mod/control/mod = null
|
||||
var/obj/item/storage = null
|
||||
|
||||
var/suit_type = null
|
||||
var/helmet_type = null
|
||||
var/mask_type = null
|
||||
/// What type of MOD the unit starts with when spawned.
|
||||
var/mod_type = null
|
||||
/// What type of additional item the unit starts with when spawned.
|
||||
var/storage_type = null
|
||||
|
||||
state_open = FALSE
|
||||
@@ -38,21 +42,50 @@
|
||||
mask_type = /obj/item/clothing/mask/gas/sechailer
|
||||
storage_type = /obj/item/tank/jetpack/oxygen/captain
|
||||
|
||||
/obj/machinery/suit_storage_unit/captainmod
|
||||
mask_type = /obj/item/clothing/mask/gas/atmos/captain
|
||||
storage_type = /obj/item/tank/jetpack/oxygen/captain
|
||||
mod_type = /obj/item/mod/control/pre_equipped/magnate
|
||||
|
||||
/obj/machinery/suit_storage_unit/engine
|
||||
suit_type = /obj/item/clothing/suit/space/hardsuit/engine
|
||||
mask_type = /obj/item/clothing/mask/breath
|
||||
storage_type= /obj/item/clothing/shoes/magboots
|
||||
|
||||
/obj/machinery/suit_storage_unit/enginemod
|
||||
mask_type = /obj/item/clothing/mask/breath
|
||||
mod_type = /obj/item/mod/control/pre_equipped/engineering
|
||||
|
||||
/obj/machinery/suit_storage_unit/atmos
|
||||
suit_type = /obj/item/clothing/suit/space/hardsuit/engine/atmos
|
||||
mask_type = /obj/item/clothing/mask/gas/atmos
|
||||
storage_type = /obj/item/watertank/atmos
|
||||
|
||||
/obj/machinery/suit_storage_unit/atmosmod
|
||||
mask_type = /obj/item/clothing/mask/gas/atmos
|
||||
storage_type = /obj/item/watertank/atmos
|
||||
mod_type = /obj/item/mod/control/pre_equipped/atmospheric
|
||||
|
||||
/obj/machinery/suit_storage_unit/ce
|
||||
suit_type = /obj/item/clothing/suit/space/hardsuit/engine/elite
|
||||
mask_type = /obj/item/clothing/mask/breath
|
||||
storage_type= /obj/item/clothing/shoes/magboots/advance
|
||||
|
||||
/obj/machinery/suit_storage_unit/cemod
|
||||
mask_type = /obj/item/clothing/mask/breath
|
||||
storage_type = /obj/item/clothing/shoes/magboots/advance
|
||||
mod_type = /obj/item/mod/control/pre_equipped/advanced
|
||||
|
||||
/obj/machinery/suit_storage_unit/security
|
||||
suit_type = /obj/item/clothing/suit/space/hardsuit/security
|
||||
mask_type = /obj/item/clothing/mask/gas/sechailer
|
||||
storage_type = /obj/item/tank/jetpack/oxygen/security
|
||||
|
||||
/obj/machinery/suit_storage_unit/securitymod
|
||||
mask_type = /obj/item/clothing/mask/gas/sechailer
|
||||
mod_type = /obj/item/mod/control/pre_equipped/security
|
||||
|
||||
|
||||
/obj/machinery/suit_storage_unit/hos
|
||||
suit_type = /obj/item/clothing/suit/space/hardsuit/security/hos
|
||||
mask_type = /obj/item/clothing/mask/gas/sechailer
|
||||
@@ -63,6 +96,11 @@
|
||||
mask_type = /obj/item/clothing/mask/gas
|
||||
storage_type = /obj/item/watertank/atmos
|
||||
|
||||
/obj/machinery/suit_storage_unit/hosmod
|
||||
mask_type = /obj/item/clothing/mask/gas/sechailer
|
||||
storage_type = /obj/item/tank/internals/oxygen
|
||||
mod_type = /obj/item/mod/control/pre_equipped/safeguard
|
||||
|
||||
/obj/machinery/suit_storage_unit/mining
|
||||
suit_type = /obj/item/clothing/suit/hooded/explorer/standard
|
||||
mask_type = /obj/item/clothing/mask/gas/explorer
|
||||
@@ -71,6 +109,16 @@
|
||||
suit_type = /obj/item/clothing/suit/space/hardsuit/mining
|
||||
mask_type = /obj/item/clothing/mask/breath
|
||||
|
||||
/obj/machinery/suit_storage_unit/mining/evahos
|
||||
suit_type = null
|
||||
mask_type = /obj/item/clothing/mask/breath
|
||||
mod_type = /obj/item/mod/control/pre_equipped/mining
|
||||
|
||||
/obj/machinery/suit_storage_unit/medicalmod
|
||||
mask_type = /obj/item/clothing/mask/breath/medical
|
||||
storage_type = /obj/item/tank/internals/oxygen
|
||||
mod_type = /obj/item/mod/control/pre_equipped/medical
|
||||
|
||||
/obj/machinery/suit_storage_unit/cmo
|
||||
suit_type = /obj/item/clothing/suit/space/hardsuit/medical
|
||||
mask_type = /obj/item/clothing/mask/breath
|
||||
@@ -81,15 +129,29 @@
|
||||
helmet_type = /obj/item/clothing/head/helmet/space/eva/paramedic
|
||||
mask_type = /obj/item/clothing/mask/breath
|
||||
|
||||
/obj/machinery/suit_storage_unit/cmomod
|
||||
mask_type = /obj/item/clothing/mask/breath/medical
|
||||
storage_type = /obj/item/tank/internals/oxygen
|
||||
mod_type = /obj/item/mod/control/pre_equipped/rescue
|
||||
|
||||
/obj/machinery/suit_storage_unit/rd
|
||||
suit_type = /obj/item/clothing/suit/space/hardsuit/rd
|
||||
mask_type = /obj/item/clothing/mask/breath
|
||||
|
||||
/obj/machinery/suit_storage_unit/rdmod
|
||||
mask_type = /obj/item/clothing/mask/breath
|
||||
mod_type = /obj/item/mod/control/pre_equipped/research
|
||||
|
||||
/obj/machinery/suit_storage_unit/syndicate
|
||||
suit_type = /obj/item/clothing/suit/space/hardsuit/syndi
|
||||
mask_type = /obj/item/clothing/mask/gas/syndicate
|
||||
storage_type = /obj/item/tank/jetpack/oxygen/harness
|
||||
|
||||
/obj/machinery/suit_storage_unit/syndicatemod
|
||||
mask_type = /obj/item/clothing/mask/gas/syndicate
|
||||
storage_type = /obj/item/tank/jetpack/oxygen/harness
|
||||
mod_type = /obj/item/mod/control/pre_equipped/nuclear
|
||||
|
||||
/obj/machinery/suit_storage_unit/ert/command
|
||||
suit_type = /obj/item/clothing/suit/space/hardsuit/ert
|
||||
mask_type = /obj/item/clothing/mask/breath
|
||||
@@ -129,6 +191,8 @@
|
||||
helmet = new helmet_type(src)
|
||||
if(mask_type)
|
||||
mask = new mask_type(src)
|
||||
if(mod_type)
|
||||
mod = new mod_type(src)
|
||||
if(storage_type)
|
||||
storage = new storage_type(src)
|
||||
update_icon()
|
||||
@@ -137,6 +201,7 @@
|
||||
QDEL_NULL(suit)
|
||||
QDEL_NULL(helmet)
|
||||
QDEL_NULL(mask)
|
||||
QDEL_NULL(mod)
|
||||
QDEL_NULL(storage)
|
||||
return ..()
|
||||
|
||||
@@ -154,7 +219,7 @@
|
||||
. += "broken"
|
||||
else
|
||||
. += "open"
|
||||
if(suit)
|
||||
if(suit || mod)
|
||||
. += "suit"
|
||||
if(helmet)
|
||||
. += "helm"
|
||||
@@ -175,6 +240,7 @@
|
||||
helmet = null
|
||||
suit = null
|
||||
mask = null
|
||||
mod = null
|
||||
storage = null
|
||||
occupant = null
|
||||
|
||||
@@ -241,6 +307,8 @@
|
||||
qdel(suit) // Delete everything but the occupant.
|
||||
mask = null
|
||||
qdel(mask)
|
||||
mod = null
|
||||
qdel(mod)
|
||||
storage = null
|
||||
qdel(storage)
|
||||
// The wires get damaged too.
|
||||
@@ -262,6 +330,9 @@
|
||||
if(mask)
|
||||
things_to_clear += mask
|
||||
things_to_clear += mask.GetAllContents()
|
||||
if(mod)
|
||||
things_to_clear += mod
|
||||
things_to_clear += mod.get_all_contents()
|
||||
if(storage)
|
||||
things_to_clear += storage
|
||||
things_to_clear += storage.GetAllContents()
|
||||
@@ -279,13 +350,25 @@
|
||||
if(occupant)
|
||||
dump_contents()
|
||||
|
||||
/obj/machinery/suit_storage_unit/proc/shock(mob/user, prb)
|
||||
if(!prob(prb))
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
if(electrocute_mob(user, src, src, 1, TRUE))
|
||||
return 1
|
||||
/obj/machinery/suit_storage_unit/process(delta_time)
|
||||
var/obj/item/stock_parts/cell/cell
|
||||
if(suit)
|
||||
if(!istype(suit))
|
||||
return
|
||||
if(!suit.cell)
|
||||
return
|
||||
cell = suit.cell
|
||||
else if(mod)
|
||||
if(!istype(mod))
|
||||
return
|
||||
if(!mod.cell)
|
||||
return
|
||||
cell = mod.cell
|
||||
else
|
||||
return
|
||||
|
||||
use_power(charge_rate * delta_time)
|
||||
cell.give(charge_rate * delta_time)
|
||||
|
||||
/obj/machinery/suit_storage_unit/relaymove(mob/user)
|
||||
if(locked)
|
||||
@@ -353,6 +436,13 @@
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
mask = I
|
||||
else if(istype(I, /obj/item/mod/control))
|
||||
if(mod)
|
||||
to_chat(user, span_warning("The unit already contains a MOD!"))
|
||||
return
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
mod = I
|
||||
else
|
||||
if(storage)
|
||||
to_chat(user, "<span class='warning'>The auxiliary storage compartment is full!</span>")
|
||||
|
||||
@@ -1271,3 +1271,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
/obj/item/proc/update_action_buttons(status_only = FALSE, force = FALSE)
|
||||
for(var/datum/action/current_action as anything in actions)
|
||||
current_action.UpdateButtonIcon(status_only, force)
|
||||
|
||||
/// Special stuff you want to do when an outfit equips this item.
|
||||
/obj/item/proc/on_outfit_equip(mob/living/carbon/human/outfit_wearer, visuals_only, item_slot)
|
||||
return
|
||||
|
||||
@@ -26,18 +26,22 @@
|
||||
user.visible_message("<span class='suicide'>[user] is trying to upload [user.p_them()]self into [src]! That's not going to work out well!</span>")
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/aicard/afterattack(atom/target, mob/user, proximity)
|
||||
. = ..()
|
||||
if(!proximity || !target)
|
||||
return
|
||||
/obj/item/aicard/pre_attack(atom/target, mob/living/user, params)
|
||||
if(AI) //AI is on the card, implies user wants to upload it.
|
||||
log_combat(user, AI, "carded", src)
|
||||
var/our_ai = AI
|
||||
target.transfer_ai(AI_TRANS_FROM_CARD, user, AI, src)
|
||||
else //No AI on the card, therefore the user wants to download one.
|
||||
target.transfer_ai(AI_TRANS_TO_CARD, user, null, src)
|
||||
if(AI)
|
||||
log_combat(user, our_ai, "uploaded", src, "to [target].")
|
||||
return TRUE
|
||||
else //No AI on the card, therefore the user wants to download one.
|
||||
target.transfer_ai(AI_TRANS_TO_CARD, user, null, src)
|
||||
if(AI)
|
||||
log_combat(user, AI, "carded", src)
|
||||
update_icon() //Whatever happened, update the card's state (icon, name) to match.
|
||||
return TRUE
|
||||
update_appearance() //Whatever happened, update the card's state (icon, name) to match.
|
||||
return ..()
|
||||
|
||||
/obj/item/aicard/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
@@ -53,7 +53,13 @@
|
||||
var/atom/movable/A = X
|
||||
if(A == wielder)
|
||||
continue
|
||||
if(A && !A.anchored && !ishuman(X))
|
||||
if(isliving(A))
|
||||
var/mob/living/vortexed_mob = A
|
||||
if(vortexed_mob.mob_negates_gravity())
|
||||
continue
|
||||
else
|
||||
vortexed_mob.Paralyze(2 SECONDS)
|
||||
if(!A.anchored && !isobserver(A))
|
||||
step_towards(A,pull)
|
||||
step_towards(A,pull)
|
||||
step_towards(A,pull)
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
var/component_type = /datum/component/storage/concrete
|
||||
|
||||
/obj/item/storage/get_dumping_location(obj/item/storage/source,mob/user)
|
||||
return src
|
||||
|
||||
/obj/item/storage/Initialize(mapload)
|
||||
. = ..()
|
||||
PopulateContents()
|
||||
|
||||
@@ -19,6 +19,25 @@
|
||||
ion_trail = new
|
||||
ion_trail.set_up(src)
|
||||
|
||||
/obj/item/tank/jetpack/Destroy()
|
||||
QDEL_NULL(ion_trail)
|
||||
return ..()
|
||||
|
||||
/obj/item/tank/jetpack/item_action_slot_check(slot)
|
||||
if(slot == ITEM_SLOT_BACK)
|
||||
return TRUE
|
||||
|
||||
/obj/item/tank/jetpack/equipped(mob/user, slot, initial)
|
||||
. = ..()
|
||||
if(on && slot != ITEM_SLOT_BACK)
|
||||
turn_off(user)
|
||||
|
||||
/obj/item/tank/jetpack/dropped(mob/user, silent)
|
||||
. = ..()
|
||||
if(on)
|
||||
turn_off(user)
|
||||
|
||||
|
||||
/obj/item/tank/jetpack/populate_gas()
|
||||
if(gas_type)
|
||||
air_contents.set_moles(gas_type, ((6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)))
|
||||
@@ -53,6 +72,7 @@
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
ion_trail.start()
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/move_react)
|
||||
RegisterSignal(user, COMSIG_MOVABLE_SPACEMOVE, .proc/spacemove_react)
|
||||
if(full_speed)
|
||||
user.add_movespeed_modifier(/datum/movespeed_modifier/jetpack/fullspeed)
|
||||
else
|
||||
@@ -90,6 +110,13 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/tank/jetpack/proc/spacemove_react(mob/user, movement_dir)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(on && (movement_dir || stabilizers))
|
||||
return COMSIG_MOVABLE_STOP_SPACEMOVE
|
||||
|
||||
|
||||
/obj/item/tank/jetpack/improvised
|
||||
name = "improvised jetpack"
|
||||
desc = "A jetpack made from two air tanks, a fire extinguisher and some atmospherics equipment. It doesn't look like it can hold much."
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
if(!anchored || current_size >= STAGE_FIVE)
|
||||
step_towards(src,S)
|
||||
|
||||
/obj/get_dumping_location(datum/component/storage/source,mob/user)
|
||||
/obj/get_dumping_location()
|
||||
return get_turf(src)
|
||||
|
||||
/**
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
new mineral(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/falsewall/get_dumping_location(obj/item/storage/source,mob/user)
|
||||
/obj/structure/falsewall/get_dumping_location()
|
||||
return null
|
||||
|
||||
/obj/structure/falsewall/examine_status(mob/user) //So you can't detect falsewalls by examine.
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
C.add_delayedload(C.newavail() * 0.0375) // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
|
||||
return ..()
|
||||
|
||||
/obj/structure/grille/get_dumping_location(datum/component/storage/source,mob/user)
|
||||
/obj/structure/grille/get_dumping_location()
|
||||
return null
|
||||
|
||||
/obj/structure/grille/broken // Pre-broken grilles for map placement
|
||||
|
||||
@@ -567,7 +567,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
take_damage(round(exposed_volume / 100), BURN, 0, 0)
|
||||
..()
|
||||
|
||||
/obj/structure/window/get_dumping_location(obj/item/storage/source,mob/user)
|
||||
/obj/structure/window/get_dumping_location()
|
||||
return null
|
||||
|
||||
/obj/structure/window/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller)
|
||||
|
||||
@@ -278,7 +278,7 @@
|
||||
if(.)
|
||||
ChangeTurf(/turf/closed/wall/clockwork)
|
||||
|
||||
/turf/closed/wall/get_dumping_location(obj/item/storage/source, mob/user)
|
||||
/turf/closed/wall/get_dumping_location()
|
||||
return null
|
||||
|
||||
/turf/closed/wall/acid_act(acidpwr, acid_volume)
|
||||
|
||||
Reference in New Issue
Block a user