Supply shuttle, initial_move() fixes, dock fixes

Supply has been almost completely replaced by -tg-'s system.

No fancy UI, unfortunately, but modifying bay's directly was not possible.
This commit is contained in:
Tigercat2000
2015-12-04 18:23:24 -08:00
parent 7c96098b72
commit c3f476f62c
24 changed files with 1108 additions and 1022 deletions
+1 -2
View File
@@ -132,8 +132,7 @@ var/list/event_last_fired = list()
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Trivial News", /datum/event/trivial_news, 400),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Mundane News", /datum/event/mundane_news, 300),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Vermin Infestation",/datum/event/infestation, 100, list(ASSIGNMENT_JANITOR = 100)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wallrot", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Cargo Bonus", /datum/event/cargo_bonus, 100)
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wallrot", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50))
)
/datum/event_container/moderate
+1 -1
View File
@@ -320,7 +320,7 @@
/area/solar,
/area/holodeck,
/area/shuttle/arrival,
/area/shuttle/escape/station,
/area/shuttle/escape,
/area/shuttle/escape_pod1/station,
/area/shuttle/escape_pod2/station,
/area/shuttle/escape_pod3/station,
+4
View File
@@ -1379,6 +1379,10 @@ mob/proc/yank_out_object()
spell.action.Grant(src)
return
//override to avoid rotating pixel_xy on mobs
/mob/shuttleRotate(rotation)
dir = angle2dir(rotation+dir2angle(dir))
/mob/proc/handle_ventcrawl()
return // Only living mobs can ventcrawl
+48 -56
View File
@@ -127,33 +127,31 @@
var/obj/docking_port/P = get_docked()
if(P) return P.id
/obj/docking_port/proc/register()
return 0
/obj/docking_port/stationary
name = "dock"
var/turf_type = /turf/space
var/area_type = /area/space
/obj/docking_port/stationary/New()
..()
spawn(0)
if(!shuttle_master)
sleep(50)
if(!shuttle_master)
sleep(50)
if(!shuttle_master)
throw EXCEPTION("docking port [src] could not initialize")
return 0 //give up
/obj/docking_port/stationary/register()
if(!shuttle_master)
throw EXCEPTION("docking port [src] could not initialize.")
return 0
shuttle_master.stationary += src
log_to_dd("stationary dock initialized [src], [id]") //SHUTTLE-WIP DEBUG
if(!id)
id = "[shuttle_master.stationary.len]"
if(name == "dock")
name = "dock[shuttle_master.stationary.len]"
shuttle_master.stationary += src
log_to_dd("stationary dock initialized [src], [id]") //SHUTTLE-WIP DEBUG
if(!id)
id = "[shuttle_master.stationary.len]"
if(name == "dock")
name = "dock[shuttle_master.stationary.len]"
#ifdef DOCKING_PORT_HIGHLIGHT
highlight("#f00")
#endif
#ifdef DOCKING_PORT_HIGHLIGHT
highlight("#f00")
#endif
return 1
//returns first-found touching shuttleport
/obj/docking_port/stationary/get_docked()
@@ -169,19 +167,12 @@
name = "In Transit"
turf_type = /turf/space/transit
/obj/docking_port/stationary/transit/New()
..()
spawn(0) //shuttle_master takes a bit to initialize
if(!shuttle_master)
sleep(50)
if(!shuttle_master)
sleep(50)
if(!shuttle_master)
throw EXCEPTION("docking port [src] could not initialize")
return 0 //give up
shuttle_master.transit += src
/obj/docking_port/stationary/transit/register()
if(!..())
return 0
shuttle_master.transit += src
return 1
/obj/docking_port/mobile
icon_state = "mobile"
@@ -201,34 +192,34 @@
/obj/docking_port/mobile/New()
..()
spawn(0)
if(!shuttle_master)
sleep(50)
if(!shuttle_master)
sleep(50)
if(!shuttle_master)
throw EXCEPTION("docking port [src] could not initialize")
return 0 //give up
shuttle_master.mobile += src
var/area/A = get_area(src)
if(istype(A, /area/shuttle))
areaInstance = A
var/area/A = get_area(src)
if(istype(A, /area/shuttle))
areaInstance = A
if(!areaInstance)
areaInstance = new()
areaInstance.name = name
areaInstance.contents += return_ordered_turfs()
if(!id)
id = "[shuttle_master.mobile.len]"
if(name == "shuttle")
name = "shuttle[shuttle_master.mobile.len]"
#ifdef DOCKING_PORT_HIGHLIGHT
highlight("#0f0")
#endif
if(!areaInstance)
areaInstance = new()
areaInstance.name = name
areaInstance.contents += return_ordered_turfs()
/obj/docking_port/mobile/register()
if(!shuttle_master)
throw EXCEPTION("docking port [src] could not initialize.")
return 0
shuttle_master.mobile += src
if(!id)
id = "[shuttle_master.mobile.len]"
if(name == "shuttle")
name = "shuttle[shuttle_master.mobile.len]"
return 1
#ifdef DOCKING_PORT_HIGHLIGHT
highlight("#0f0")
#endif
//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/canMove()
@@ -409,8 +400,9 @@
Door.close()
if(istype(Door, /obj/machinery/door/airlock))
var/obj/machinery/door/airlock/A = Door
A.lock()
door_unlock_list += A
if(A.id_tag == "s_docking_airlock")
A.lock()
door_unlock_list += A
else if (istype(AM,/mob))
var/mob/M = AM
if(!M.move_on_shuttle)