Skip to content

Add Code Guards for Airlocks Without Wires#54

Merged
blinkdog merged 1 commit into
mainfrom
airlock-sans-wires
May 24, 2026
Merged

Add Code Guards for Airlocks Without Wires#54
blinkdog merged 1 commit into
mainfrom
airlock-sans-wires

Conversation

@blinkdog

Copy link
Copy Markdown
Contributor

One of the integration tests failed:
https://github.com/Starfly-13/sf13/actions/runs/24620249359/job/71989545373

Looks like a wooden airlock without wires spawned near a goliath pup who bumped into the airlock.
It wanted to check if the airlock needed an ID, and if so if the goliath pup had an ID to pass through the airlock.
However, because the airlock did not have wires, it couldn't call is_cut() on a null.

  Testing Ruin: Serene Hunts
  MAPGEN: MAPGEN REF [0x21013b50] (/datum/map_generator/planet_generator/jungle) STARTING TURF GEN
  MAPGEN: MAPGEN REF [0x21013b50] (/datum/map_generator/planet_generator/jungle) HAS FINISHED TURF GEN IN 5.3s
  [2026-04-19 03:45:27] Runtime in code/game/machinery/doors/airlock.dm,452: Cannot execute null.is cut().
    proc name: requiresID (/obj/machinery/door/airlock/requiresID)
    src: the wooden airlock (/obj/machinery/door/airlock/wood)
    src.loc: the floor (17,19,4) (/turf/open/floor/wood/ebony)
    call stack:
    the wooden airlock (/obj/machinery/door/airlock/wood): requiresID()
    the wooden airlock (/obj/machinery/door/airlock/wood): bumpopen(the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup))
    the wooden airlock (/obj/machinery/door/airlock/wood): bumpopen(the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup))
    the wooden airlock (/obj/machinery/door/airlock/wood): Bumped(the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup))
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Bump(the wooden airlock (/obj/machinery/door/airlock/wood))
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Bump(the wooden airlock (/obj/machinery/door/airlock/wood))
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Bump(the wooden airlock (/obj/machinery/door/airlock/wood))
    the floor (17,19,4) (/turf/open/floor/wood/ebony): Enter(the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup), null, 0)
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Move(the floor (17,19,4) (/turf/open/floor/wood/ebony), 1, 0, 1)
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Move(the floor (17,19,4) (/turf/open/floor/wood/ebony), 1, 0, null)
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Move(the floor (17,19,4) (/turf/open/floor/wood/ebony), 1, null, null)
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Move(the floor (17,19,4) (/turf/open/floor/wood/ebony), 1, null, null)
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): handle automated movement()
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): handle automated movement()
    NPC Pool (/datum/controller/subsystem/npcpool): fire(0)
    NPC Pool (/datum/controller/subsystem/npcpool): ignite(0)
    Master (/datum/controller/master): RunQueue()
    Master (/datum/controller/master): Loop(2)
    Master (/datum/controller/master): StartProcessing(0)
  MAPGEN: MAPGEN REF [0x21013b50] (/datum/map_generator/planet_generator/jungle) STARTING POST GEN
  MAPGEN: MAPGEN REF [0x21013b50] (/datum/map_generator/planet_generator/jungle) HAS FINISHED POST GEN IN 1.2s
  Cleaning up Foe (jungle planetoid)
  Error: [2026-04-19 03:45:27] Runtime in code/game/machinery/doors/airlock.dm,452: Cannot execute null.is cut().
    proc name: requiresID (/obj/machinery/door/airlock/requiresID)
    src: the wooden airlock (/obj/machinery/door/airlock/wood)
    src.loc: the floor (17,19,4) (/turf/open/floor/wood/ebony)
    call stack:
    the wooden airlock (/obj/machinery/door/airlock/wood): requiresID()
    the wooden airlock (/obj/machinery/door/airlock/wood): bumpopen(the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup))
    the wooden airlock (/obj/machinery/door/airlock/wood): bumpopen(the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup))
    the wooden airlock (/obj/machinery/door/airlock/wood): Bumped(the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup))
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Bump(the wooden airlock (/obj/machinery/door/airlock/wood))
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Bump(the wooden airlock (/obj/machinery/door/airlock/wood))
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Bump(the wooden airlock (/obj/machinery/door/airlock/wood))
    the floor (17,19,4) (/turf/open/floor/wood/ebony): Enter(the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup), null, 0)
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Move(the floor (17,19,4) (/turf/open/floor/wood/ebony), 1, 0, 1)
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Move(the floor (17,19,4) (/turf/open/floor/wood/ebony), 1, 0, null)
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Move(the floor (17,19,4) (/turf/open/floor/wood/ebony), 1, null, null)
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Move(the floor (17,19,4) (/turf/open/floor/wood/ebony), 1, null, null)
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): handle automated movement()
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): handle automated movement()
    NPC Pool (/datum/controller/subsystem/npcpool): fire(0)
    NPC Pool (/datum/controller/subsystem/npcpool): ignite(0)
    Master (/datum/controller/master): RunQueue()
    Master (/datum/controller/master): Loop(2)
    Master (/datum/controller/master): StartProcessing(0)
  	FAILURE #1: [2026-04-19 03:45:27] Runtime in code/game/machinery/doors/airlock.dm,452: Cannot execute null.is cut().
    proc name: requiresID (/obj/machinery/door/airlock/requiresID)
    src: the wooden airlock (/obj/machinery/door/airlock/wood)
    src.loc: the floor (17,19,4) (/turf/open/floor/wood/ebony)
    call stack:
    the wooden airlock (/obj/machinery/door/airlock/wood): requiresID()
    the wooden airlock (/obj/machinery/door/airlock/wood): bumpopen(the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup))
    the wooden airlock (/obj/machinery/door/airlock/wood): bumpopen(the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup))
    the wooden airlock (/obj/machinery/door/airlock/wood): Bumped(the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup))
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Bump(the wooden airlock (/obj/machinery/door/airlock/wood))
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Bump(the wooden airlock (/obj/machinery/door/airlock/wood))
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Bump(the wooden airlock (/obj/machinery/door/airlock/wood))
    the floor (17,19,4) (/turf/open/floor/wood/ebony): Enter(the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup), null, 0)
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Move(the floor (17,19,4) (/turf/open/floor/wood/ebony), 1, 0, 1)
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Move(the floor (17,19,4) (/turf/open/floor/wood/ebony), 1, 0, null)
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Move(the floor (17,19,4) (/turf/open/floor/wood/ebony), 1, null, null)
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): Move(the floor (17,19,4) (/turf/open/floor/wood/ebony), 1, null, null)
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): handle automated movement()
    the goliath pup (/mob/living/simple_animal/hostile/asteroid/goliath/pup): handle automated movement()
    NPC Pool (/datum/controller/subsystem/npcpool): fire(0)
    NPC Pool (/datum/controller/subsystem/npcpool): ignite(0)
    Master (/datum/controller/master): RunQueue()
    Master (/datum/controller/master): Loop(2)
    Master (/datum/controller/master): StartProcessing(0) at code/game/machinery/doors/airlock.dm:452
Error: FAIL /datum/unit_test/ruin_placement 90.2s

This PR adds some code guards in the airlock class everywhere wires is used.
If there are no wires, we just do nothing instead of crashing.

@blinkdog blinkdog self-assigned this Apr 19, 2026
@blinkdog blinkdog merged commit 5fd2141 into main May 24, 2026
34 checks passed
@blinkdog blinkdog deleted the airlock-sans-wires branch May 24, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant