Files
BatrachophrenoandGitHub 8ebd7c9ad5 SCCV Horizon Aft Extension & Partial Remap (#21495)
**Overview:**
The first huge fuckoff mapping PR for giving the Horizon enough extra
space to be able to comfortably map on it for the duration before NBT2
and not be super cramped (extends aft by 6 turfs).

Includes a SECOND vault to heist at the back of the ship and a lot of
maint area people can repurpose. Notably, this also removes the Xenobio
Hazardous Containment room and the Medical Emergency Storage room
(contents of the latter have been moved). Otherwise, y'all got more
ship.

**Map Images (OUTDATED NOW):**
<img width="2453" height="868" alt="Screenshot 2025-10-16 141649"
src="https://github.com/user-attachments/assets/be9a540d-af92-46b4-b59f-e298204a678a"
/>
<img width="2450" height="940" alt="Screenshot 2025-10-16 141702"
src="https://github.com/user-attachments/assets/b96f3f3e-dd4b-4457-9c5c-1f09f8bb7a00"
/>
<img width="2452" height="895" alt="Screenshot 2025-10-16 141714"
src="https://github.com/user-attachments/assets/9a16e55d-8386-46d9-a3d3-d4e5a0ff6ec0"
/>

**Misc Features:**
<img width="1069" height="685" alt="Screenshot 2025-10-16 141727"
src="https://github.com/user-attachments/assets/89c14f85-f476-4f91-bd02-7c36f36a4418"
/>
<img width="983" height="825" alt="Screenshot 2025-10-16 141736"
src="https://github.com/user-attachments/assets/6b20da20-982c-4ec1-b252-3507f1211e94"
/>
<img width="1382" height="951" alt="Screenshot 2025-10-16 141743"
src="https://github.com/user-attachments/assets/fdfd683d-33a4-47e3-9df8-dec1f9286598"
/>
<img width="2405" height="863" alt="Screenshot 2025-10-16 141803"
src="https://github.com/user-attachments/assets/c539c4bd-4a8f-4326-a30b-5a1d09eca26b"
/>

**changes:**
- qol: "Hugely expands the Horizon's maints and adjusts/expands much of
the aft of the ship."
  - rscadd: "Adds a new Vault to Horizon (Deck 3 aft, behind the Gym)."
  - rscdel: "Removes Xenobiology Hazardous Specimens compartment."
  - rscdel: "Removes Medical Emergency Storage compartment."
  - spellcheck: "Replaces a few mentions of 'room' with 'compartment.'"
  - spellcheck: "Renames the Bridge Break Room to Bridge Wardroom."
  - spellcheck: "Renames the Kitchen to the Galley."
  - spellcheck: "Renames the Dining Hall to the Mess Hall."
  - spellcheck: "Renames each Washroom to the Head."
2025-11-04 09:52:40 +00:00

182 lines
5.3 KiB
Plaintext

/obj/machinery/portable_atmospherics/powered/pump
name = "portable air pump"
desc = "Used to fill or drain rooms without differentiating between gases. Invaluable for filling air in a compartment rapidly after a breach repair."
icon = 'icons/obj/atmos.dmi'
icon_state = "psiphon:0"
density = TRUE
w_class = WEIGHT_CLASS_NORMAL
var/on = FALSE
var/direction_out = 0 //0 = siphoning, 1 = releasing
var/target_pressure = ONE_ATMOSPHERE
var/pressuremin = 0
var/pressuremax = PRESSURE_ONE_THOUSAND
volume = 1000
power_rating = 7500 //7500 W ~ 10 HP
power_losses = 150
/obj/machinery/portable_atmospherics/powered/pump/mechanics_hints(mob/user, distance, is_adjacent)
. += ..()
. += "The internal gas container can be filled by connecting it to a connector port. The pump can pump the air in (sucking) \
or out (blowing), at a specific target pressure."
. += "The power cell inside can be replaced by using a screwdriver, then adding a new cell. Screw it closed again afterwards."
. += "A tank of gas can also be attached to the air pump."
/obj/machinery/portable_atmospherics/powered/pump/filled
start_pressure = PRESSURE_ONE_THOUSAND * 5
/obj/machinery/portable_atmospherics/powered/pump/Initialize()
. = ..()
cell = new/obj/item/cell/apc(src)
var/list/air_mix = StandardAirMix()
src.air_contents.adjust_multi(GAS_OXYGEN, air_mix[GAS_OXYGEN], GAS_NITROGEN, air_mix[GAS_NITROGEN])
/obj/machinery/portable_atmospherics/powered/pump/update_icon()
ClearOverlays()
if(on && cell && cell.charge)
icon_state = "psiphon:1"
else
icon_state = "psiphon:0"
if(holding)
AddOverlays("siphon-open")
if(connected_port)
AddOverlays("siphon-connector")
return
/obj/machinery/portable_atmospherics/powered/pump/emp_act(severity)
. = ..()
if(stat & (BROKEN|NOPOWER))
return
if(prob(50/severity))
on = !on
if(prob(100/severity))
direction_out = !direction_out
target_pressure = rand(0,1300)
update_icon()
SStgui.update_uis(src)
/obj/machinery/portable_atmospherics/powered/pump/process()
..()
var/power_draw = -1
if(on && cell && cell.charge)
var/datum/gas_mixture/environment
if(holding)
environment = holding.air_contents
else if(loc)
environment = loc.return_air()
else return
var/pressure_delta
var/output_volume
var/air_temperature
if(direction_out)
pressure_delta = target_pressure - environment.return_pressure()
output_volume = environment.volume * environment.group_multiplier
air_temperature = environment.temperature? environment.temperature : air_contents.temperature
else
pressure_delta = environment.return_pressure() - target_pressure
output_volume = air_contents.volume * air_contents.group_multiplier
air_temperature = air_contents.temperature? air_contents.temperature : environment.temperature
var/transfer_moles = pressure_delta*output_volume/(air_temperature * R_IDEAL_GAS_EQUATION)
if (pressure_delta > 0.01)
if (direction_out)
power_draw = pump_gas(src, air_contents, environment, transfer_moles, power_rating)
else
power_draw = pump_gas(src, environment, air_contents, transfer_moles, power_rating)
if (power_draw < 0)
last_flow_rate = 0
last_power_draw = 0
else
power_draw = max(power_draw, power_losses)
cell.use(power_draw * CELLRATE)
last_power_draw = power_draw
update_connected_network()
//ran out of charge
if (!cell.charge)
power_change()
update_icon()
src.updateDialog()
SStgui.update_uis(src)
/obj/machinery/portable_atmospherics/powered/pump/return_air()
return air_contents
/obj/machinery/portable_atmospherics/powered/pump/attack_ai(var/mob/user)
if(!ai_can_interact(user))
return
src.add_hiddenprint(user)
return src.attack_hand(user)
/obj/machinery/portable_atmospherics/powered/pump/attack_ghost(var/mob/user)
return src.attack_hand(user)
/obj/machinery/portable_atmospherics/powered/pump/attack_hand(var/mob/user)
ui_interact(user)
/obj/machinery/portable_atmospherics/powered/pump/ui_data(mob/user)
var/list/data = list()
data["portConnected"] = connected_port ? 1 : 0
data["tankPressure"] = round(air_contents.return_pressure() > 0 ? air_contents.return_pressure() : 0)
data["targetpressure"] = round(target_pressure)
data["pump_dir"] = direction_out
data["minpressure"] = round(pressuremin)
data["maxpressure"] = round(pressuremax)
data["powerDraw"] = round(last_power_draw)
data["cellCharge"] = cell ? cell.charge : 0
data["cellMaxCharge"] = cell ? cell.maxcharge : 1
data["on"] = on ? 1 : 0
data["hasHoldingTank"] = holding ? 1 : 0
if (holding)
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure() > 0 ? holding.air_contents.return_pressure() : 0))
return data
/obj/machinery/portable_atmospherics/powered/pump/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "PortablePump", "Portable Pump", 480, 450)
ui.open()
/obj/machinery/portable_atmospherics/powered/pump/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
. = ..()
if(.)
return
switch(action)
if("power")
on = !on
. = TRUE
if("direction")
direction_out = !direction_out
. = TRUE
if ("remove_tank")
if(holding)
holding.forceMove(loc)
holding = null
. = TRUE
if ("pressure_set")
target_pressure = between(pressuremin, text2num(params["pressure_set"]), pressuremax)
. = TRUE
if(.)
update_icon()