Skip to content

Commit

Permalink
mucks around a little.
Browse files Browse the repository at this point in the history
  • Loading branch information
Erikafox committed Sep 22, 2024
1 parent e03aaab commit 1b35142
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,9 @@
/atom/proc/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock)
return

/atom/proc/late_connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock)
return

/atom/proc/disconnect_from_shuttle(obj/docking_port/mobile/port)
return

Expand Down
2 changes: 2 additions & 0 deletions code/game/machinery/porta_turret/portable_turret.dm
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,8 @@ DEFINE_BITFIELD(turret_flags, list(

/obj/machinery/turretid/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock)
id = "[REF(port)][id]"

/obj/machinery/turretid/late_connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock)
for(var/datum/weakref/ship_guns in port.turret_list)
var/obj/machinery/porta_turret/turret_gun = ship_guns.resolve()
if(turret_gun.id == id)
Expand Down
12 changes: 12 additions & 0 deletions code/modules/shuttle/shuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,18 @@
for(var/each in place)
var/atom/atom = each
atom.connect_to_shuttle(src, dock)
late_linkup(docked, current_ship)

//Called after shuttle is completely loaded and connected
/obj/docking_port/mobile/proc/late_linkup(obj/docking_port/stationary/dock, datum/overmap/ship/controlled/new_ship)
current_ship = new_ship
docked = dock
for(var/place in shuttle_areas)
var/area/area = place
area.late_connect_to_shuttle(src, dock)
for(var/each in place)
var/atom/atom = each
atom.late_connect_to_shuttle(src, dock)

//this is a hook for custom behaviour. Maybe at some point we could add checks to see if engines are intact
/obj/docking_port/mobile/proc/can_move()
Expand Down

0 comments on commit 1b35142

Please sign in to comment.