Exosuit Passenger Compartments (#7890)

* passenger compartments

* added to mechfab
This commit is contained in:
Alberyk
2020-01-06 16:23:27 -03:00
committed by GitHub
7 changed files with 57 additions and 6 deletions
+8 -5
View File
@@ -12,6 +12,7 @@
var/allow_occupant_types = list(/mob/living/carbon/human)
var/disallow_occupant_types = list()
var/pump
var/display_loading_message = TRUE
use_power = 1
idle_power_usage = 15
@@ -177,7 +178,8 @@
to_chat(user, "<span class='warning'>\The machine won't accept that.</span>")
return
user.visible_message("<span class='notice'>[user] starts putting [G.affecting] into [src].</span>", "<span class='notice'>You start putting [G.affecting] into [src].</span>", range = 3)
if(display_loading_message)
user.visible_message("<span class='notice'>[user] starts putting [G.affecting] into [src].</span>", "<span class='notice'>You start putting [G.affecting] into [src].</span>", range = 3)
if (do_mob(user, G.affecting, 20, needhand = 0))
if(occupant)
@@ -250,10 +252,11 @@
to_chat(user, "<span class='warning'>\The [src] is already occupied.</span>")
return
if(M == user)
visible_message("\The [user] starts climbing into \the [src].")
else
visible_message("\The [user] starts putting [M] into \the [src].")
if(display_loading_message)
if(M == user)
visible_message("\The [user] starts climbing into \the [src].")
else
visible_message("\The [user] starts putting [M] into \the [src].")
if(do_after(user, 20))
if(occupant)
@@ -57,6 +57,7 @@
idle_power_usage = 0
active_power_usage = 0 //It'd be hard to handle, so for now all power is consumed by mech sleeper object
interact_offline = TRUE
display_loading_message = FALSE
/obj/machinery/sleeper/mounted/ui_interact(var/mob/user, var/ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = mech_state)
. = ..()
@@ -383,4 +383,39 @@
src.damtype = "fire"
update_icon()
START_PROCESSING(SSprocessing, src)
..()
..()
// Kinda hacky, but hey, avoids some severe shitcode later on - geeves
/obj/item/mecha_equipment/sleeper/passenger_compartment
name = "\improper mounted passenger compartment"
desc = "An exosuit-mounted passenger compartment that can comfortably hold a single humanoid."
icon_state = "mecha_passenger_open"
mech_layer = MECH_GEAR_LAYER
restricted_hardpoints = list(HARDPOINT_LEFT_HAND, HARDPOINT_RIGHT_HAND)
restricted_software = null
origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
passive_power_use = 15
/obj/item/mecha_equipment/sleeper/passenger_compartment/uninstalled()
. = ..()
icon_state = "mecha_passenger_open"
update_icon()
owner.update_icon()
/obj/item/mecha_equipment/sleeper/passenger_compartment/attack_self(var/mob/user)
if(!sleeper.occupant)
to_chat(user, span("warning", "There's no one to eject!"))
else
visible_message(span("notice", "\The [src] ejects [sleeper.occupant.name]."))
sleeper.go_out()
icon_state = "mecha_passenger_open"
update_icon()
owner.update_icon()
return
/obj/item/mecha_equipment/sleeper/passenger_compartment/afterattack(var/atom/target, var/mob/living/user, var/inrange, var/params)
. = ..()
if(.)
icon_state = "mecha_passenger"
update_icon()
owner.update_icon()
@@ -346,3 +346,9 @@
id = "mech_flare"
materials = list(DEFAULT_WALL_MATERIAL = 10000)
build_path = /obj/item/mecha_equipment/mounted_system/flarelauncher
/datum/design/item/mechfab/exosuit/passenger_compartment
name = "mounted passenger compartment"
id = "mech_pass_comp"
materials = list(DEFAULT_WALL_MATERIAL = 10000)
build_path = /obj/item/mecha_equipment/sleeper/passenger_compartment
+6
View File
@@ -0,0 +1,6 @@
author: Code by Geeves, Sprites by Kyres
delete-after: True
changes:
- rscadd: "Added mech passenger compartments."
Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 28 KiB