mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-02 21:11:57 +00:00
* A lot of shuttle code improvements * Makes use of ``as anything`` in many places * Adds mapload to connect_to_shuttle() * Renames many vars, including shuttle 'id' var to 'shuttle_id' and engine 'state' to 'engine_state'. * Engines now weakref their attached ship, and disconnect when unwrenched from it. * Removes check for force when deleting a mobile docking port, being deleted should still clear your stuff, regardless of being forced. Because of all the above, I was able to remove a few pointless checks scattered around, like engine's alter_engine_power() * better comment for port_id * Fixes Cargo, Arrivals, and Pirate ships. * Merge branch 'master' into shuttlecode-oh-no * last few * fixes the CI * fixes * Fixes infinite engines * Revert "Merge branch 'master' into shuttlecode-oh-no" This reverts commit 94eba37de9fe3f4a01dc40bb064771b764f379e3. * trammies * whiteship tram * Makes use of ?. instead apparently this is what weakrefs use, so 🤷 * i hate supernovaa41 Co-authored-by: Seth Scherer <supernovaa41@gmx.com> * removes lateinit that I never implemented * adds _ref to weakref var name * small change to weld time define Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
151 lines
5.5 KiB
Plaintext
151 lines
5.5 KiB
Plaintext
/**********************Light************************/
|
|
|
|
//this item is intended to give the effect of entering the mine, so that light gradually fades. we also use the base effect for certain lighting effects while mapping.
|
|
/obj/effect/light_emitter
|
|
name = "light emitter"
|
|
icon_state = "lighting_marker"
|
|
anchored = TRUE
|
|
invisibility = INVISIBILITY_ABSTRACT
|
|
var/set_luminosity = 8
|
|
var/set_cap = 0
|
|
|
|
/obj/effect/light_emitter/Initialize(mapload)
|
|
. = ..()
|
|
set_light(set_luminosity, set_cap)
|
|
|
|
/obj/effect/light_emitter/singularity_pull()
|
|
return
|
|
|
|
/obj/effect/light_emitter/singularity_act()
|
|
return
|
|
|
|
/**********************Miner Lockers**************************/
|
|
|
|
/obj/structure/closet/wardrobe/miner
|
|
name = "mining wardrobe"
|
|
icon_door = "mixed"
|
|
|
|
/obj/structure/closet/wardrobe/miner/PopulateContents()
|
|
new /obj/item/storage/backpack/duffelbag/explorer(src)
|
|
new /obj/item/storage/backpack/explorer(src)
|
|
new /obj/item/storage/backpack/satchel/explorer(src)
|
|
new /obj/item/clothing/under/rank/cargo/miner/lavaland(src)
|
|
new /obj/item/clothing/under/rank/cargo/miner/lavaland(src)
|
|
new /obj/item/clothing/under/rank/cargo/miner/lavaland(src)
|
|
new /obj/item/clothing/shoes/workboots/mining(src)
|
|
new /obj/item/clothing/shoes/workboots/mining(src)
|
|
new /obj/item/clothing/shoes/workboots/mining(src)
|
|
new /obj/item/clothing/gloves/color/black(src)
|
|
new /obj/item/clothing/gloves/color/black(src)
|
|
new /obj/item/clothing/gloves/color/black(src)
|
|
new /obj/item/clothing/suit/hooded/wintercoat/miner(src)
|
|
new /obj/item/clothing/suit/hooded/wintercoat/miner(src)
|
|
new /obj/item/clothing/suit/hooded/wintercoat/miner(src)
|
|
|
|
/obj/structure/closet/secure_closet/miner
|
|
name = "miner's equipment"
|
|
icon_state = "mining"
|
|
req_access = list(ACCESS_MINING)
|
|
|
|
/obj/structure/closet/secure_closet/miner/unlocked
|
|
locked = FALSE
|
|
|
|
/obj/structure/closet/secure_closet/miner/PopulateContents()
|
|
..()
|
|
new /obj/item/stack/sheet/mineral/sandbags(src, 5)
|
|
new /obj/item/storage/box/emptysandbags(src)
|
|
new /obj/item/shovel(src)
|
|
new /obj/item/pickaxe/mini(src)
|
|
new /obj/item/radio/headset/headset_cargo/mining(src)
|
|
new /obj/item/flashlight/seclite(src)
|
|
new /obj/item/storage/bag/plants(src)
|
|
new /obj/item/storage/bag/ore(src)
|
|
new /obj/item/t_scanner/adv_mining_scanner/lesser(src)
|
|
new /obj/item/gun/energy/recharge/kinetic_accelerator(src)
|
|
new /obj/item/clothing/glasses/meson(src)
|
|
new /obj/item/survivalcapsule(src)
|
|
new /obj/item/assault_pod/mining(src)
|
|
|
|
|
|
/**********************Shuttle Computer**************************/
|
|
|
|
/obj/machinery/computer/shuttle/mining
|
|
name = "mining shuttle console"
|
|
desc = "Used to call and send the mining shuttle."
|
|
circuit = /obj/item/circuitboard/computer/mining_shuttle
|
|
shuttleId = "mining"
|
|
possible_destinations = "mining_home;mining_away;landing_zone_dock;mining_public"
|
|
no_destination_swap = TRUE
|
|
var/static/list/dumb_rev_heads = list()
|
|
|
|
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
|
/obj/machinery/computer/shuttle/mining/attack_hand(mob/user, list/modifiers)
|
|
if(is_station_level(user.z) && user.mind && IS_HEAD_REVOLUTIONARY(user) && !(user.mind in dumb_rev_heads))
|
|
to_chat(user, span_warning("You get a feeling that leaving the station might be a REALLY dumb idea..."))
|
|
dumb_rev_heads += user.mind
|
|
return
|
|
|
|
if (HAS_TRAIT(user, TRAIT_FORBID_MINING_SHUTTLE_CONSOLE_OUTSIDE_STATION) && !is_station_level(user.z))
|
|
to_chat(user, span_warning("You get the feeling you shouldn't mess with this."))
|
|
return
|
|
|
|
if(HAS_TRAIT(user, TRAIT_ILLITERATE))
|
|
to_chat(user, span_warning("You start mashing buttons at random!"))
|
|
if(do_after(user, 10 SECONDS, target = src))
|
|
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
|
|
if(no_destination_swap)
|
|
if(M.mode == SHUTTLE_RECHARGING)
|
|
to_chat(usr, span_warning("Shuttle engines are not ready for use."))
|
|
return
|
|
if(M.mode != SHUTTLE_IDLE)
|
|
to_chat(usr, span_warning("Shuttle already in transit."))
|
|
return
|
|
var/destionation = M.getDockedId() == "mining_home" ? "mining_away" : "mining_home"
|
|
switch(SSshuttle.moveShuttle(shuttleId, destionation, 1))
|
|
if(0)
|
|
say("Shuttle departing. Please stand away from the doors.")
|
|
log_shuttle("[key_name(usr)] has sent shuttle \"[M]\" towards \"[destionation]\", using [src].")
|
|
return TRUE
|
|
if(1)
|
|
to_chat(usr, span_warning("Invalid shuttle requested."))
|
|
else
|
|
to_chat(usr, span_warning("Unable to comply."))
|
|
|
|
return
|
|
|
|
return ..()
|
|
|
|
/obj/machinery/computer/shuttle/mining/common
|
|
name = "lavaland shuttle console"
|
|
desc = "Used to call and send the lavaland shuttle."
|
|
circuit = /obj/item/circuitboard/computer/mining_shuttle/common
|
|
shuttleId = "mining_common"
|
|
possible_destinations = "commonmining_home;lavaland_common_away;landing_zone_dock;mining_public"
|
|
|
|
/obj/docking_port/stationary/mining_home
|
|
name = "SS13: Mining Dock"
|
|
shuttle_id = "mining_home"
|
|
roundstart_template = /datum/map_template/shuttle/mining/delta
|
|
width = 7
|
|
dwidth = 3
|
|
height = 5
|
|
|
|
/obj/docking_port/stationary/mining_home/kilo
|
|
roundstart_template = /datum/map_template/shuttle/mining/kilo
|
|
height = 10
|
|
|
|
/obj/docking_port/stationary/mining_home/common
|
|
name = "SS13: Common Mining Dock"
|
|
shuttle_id = "commonmining_home"
|
|
roundstart_template = /datum/map_template/shuttle/mining_common/meta
|
|
|
|
/obj/docking_port/stationary/mining_home/common/kilo
|
|
roundstart_template = /datum/map_template/shuttle/mining_common/kilo
|
|
|
|
/**********************Mining car (Crate like thing, not the rail car)**************************/
|
|
|
|
/obj/structure/closet/crate/miningcar
|
|
desc = "A mining car. This one doesn't work on rails, but has to be dragged."
|
|
name = "Mining car (not for rails)"
|
|
icon_state = "miningcar"
|