Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Heretic blade teleportation doesn't work #717

Open
SabreML opened this issue May 15, 2022 · 2 comments · May be fixed by #469
Open

Heretic blade teleportation doesn't work #717

SabreML opened this issue May 15, 2022 · 2 comments · May be fixed by #469
Assignees
Labels
Fixed But Not Merged MERGE MY PR ZAS Bugs/PRs Related to Zone Atmospherics

Comments

@SabreML
Copy link
Contributor

SabreML commented May 15, 2022

(Reported by Fallikaar#5812 on the Discord server.)

Round ID:

N/A

Testmerges:

#469

Reproduction:

  1. Become a Heretic.
  2. Use a heretic blade (/obj/item/melee/sickly_blade) in your hand, which should teleport you to a safe location.
  3. Remain in the same spot, now without a blade.

This is being caused by the is_safe_turf() proc not being fully updated for ZAS yet, and is presumably affecting other things that use the proc as well.
Everything up to line 151 seems to work fine, but after that point the code is assuming that floor_gases is a /datum/gas_mixture rather than a list.


Current:

var/datum/gas_mixture/floor_gas_mixture = floor_turf.air
if(!floor_gas_mixture)
return
var/list/floor_gases = floor_gas_mixture.gases
var/trace_gases
for(var/id in floor_gases)
if(id in GLOB.hardcoded_gases)
continue
trace_gases = TRUE
break
// Can most things breathe?
if(trace_gases)
return
if(!(floor_gases[/datum/gas/oxygen] && floor_gases[/datum/gas/oxygen][MOLES] >= 16))
return
if(floor_gases[/datum/gas/plasma])
return
if(floor_gases[/datum/gas/carbon_dioxide] && floor_gases[/datum/gas/carbon_dioxide][MOLES] >= 10)
return
// Aim for goldilocks temperatures and pressure
if((floor_gas_mixture.temperature <= 270) || (floor_gas_mixture.temperature >= 360))
return
var/pressure = floor_gas_mixture.return_pressure()
if((pressure <= 20) || (pressure >= 550))
return

gasses before

ZASR:

var/datum/gas_mixture/floor_gases= floor_turf.return_air()?.getGases()
if(!floor_gases)
return
if(!(floor_gases[GAS_OXYGEN] >= 16))
return
if(floor_gases[GAS_PLASMA])
return
if(floor_gases[GAS_CO2] >= 10)
return
// Aim for goldilocks temperatures and pressure
if((floor_gases.temperature <= 270) || (floor_gases.temperature >= 360))
return
var/pressure = floor_gases.returnPressure()
if((pressure <= 20) || (pressure >= 550))
return

gasses

@SabreML SabreML added the ZAS Bugs/PRs Related to Zone Atmospherics label May 15, 2022
@Kapu1178
Copy link
Contributor

epic.

@francinum francinum linked a pull request May 20, 2022 that will close this issue
9 tasks
@Kapu1178 Kapu1178 added the Fixed But Not Merged MERGE MY PR label Jun 25, 2022
@Kapu1178
Copy link
Contributor

I believe I fixed this a while ago and just forgot to mark the issue. If it persists, please inform me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Fixed But Not Merged MERGE MY PR ZAS Bugs/PRs Related to Zone Atmospherics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants