mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 13:39:16 +01:00
/atom New() => Initialize() [MDB IGNORE]
This commit is contained in:
@@ -7,6 +7,20 @@ somewhere on that shuttle. Subtypes of these can be then used to perform ship ov
|
||||
var/obj/effect/overmap/visitable/ship/linked
|
||||
var/list/viewers // Weakrefs to mobs in direct-view mode.
|
||||
var/extra_view = 0 // how much the view is increased by when the mob is in overmap mode.
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
var/list/whitelisted_types = list(/obj/effect/overmap/visitable/ship)
|
||||
var/list/blacklisted_types = list()
|
||||
|
||||
/obj/machinery/computer/ship/Initialize()
|
||||
. = ..()
|
||||
var/list/L = list()
|
||||
for(var/type in whitelisted_types)
|
||||
L |= typesof(type)
|
||||
for(var/type in blacklisted_types)
|
||||
L -= typesof(type)
|
||||
whitelisted_types = L
|
||||
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
|
||||
|
||||
// A late init operation called in SSshuttles, used to attach the thing to the right ship.
|
||||
/obj/machinery/computer/ship/proc/attempt_hook_up(obj/effect/overmap/visitable/ship/sector)
|
||||
|
||||
@@ -189,11 +189,13 @@
|
||||
light_color = "#ed9200"
|
||||
anchored = TRUE
|
||||
|
||||
/obj/effect/engine_exhaust/New(var/turf/nloc, var/ndir, var/flame)
|
||||
..(nloc)
|
||||
/obj/effect/engine_exhaust/Initialize(var/ml, var/ndir, var/flame)
|
||||
. = ..(ml)
|
||||
if(flame)
|
||||
icon_state = "exhaust"
|
||||
nloc.hotspot_expose(1000,125)
|
||||
if(isturf(loc))
|
||||
var/turf/T = loc
|
||||
T.hotspot_expose(1000,125)
|
||||
set_light(0.5, 3)
|
||||
set_dir(ndir)
|
||||
QDEL_IN(src, 20)
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
//Thermal nozzle engine
|
||||
/datum/ship_engine/thermal
|
||||
name = "thermal engine"
|
||||
|
||||
/datum/ship_engine/thermal/get_status()
|
||||
..()
|
||||
var/obj/machinery/atmospherics/unary/engine/E = engine
|
||||
return "Fuel pressure: [E.air_contents.return_pressure()]"
|
||||
|
||||
/datum/ship_engine/thermal/get_thrust()
|
||||
..()
|
||||
var/obj/machinery/atmospherics/unary/engine/E = engine
|
||||
if(!is_on())
|
||||
return 0
|
||||
var/pressurized_coef = E.air_contents.return_pressure()/E.effective_pressure
|
||||
return round(E.thrust_limit * E.nominal_thrust * pressurized_coef)
|
||||
|
||||
/datum/ship_engine/thermal/burn()
|
||||
..()
|
||||
var/obj/machinery/atmospherics/unary/engine/E = engine
|
||||
return E.burn()
|
||||
|
||||
/datum/ship_engine/thermal/set_thrust_limit(var/new_limit)
|
||||
..()
|
||||
var/obj/machinery/atmospherics/unary/engine/E = engine
|
||||
E.thrust_limit = new_limit
|
||||
|
||||
/datum/ship_engine/thermal/get_thrust_limit()
|
||||
..()
|
||||
var/obj/machinery/atmospherics/unary/engine/E = engine
|
||||
return E.thrust_limit
|
||||
|
||||
/datum/ship_engine/thermal/is_on()
|
||||
..()
|
||||
var/obj/machinery/atmospherics/unary/engine/E = engine
|
||||
return E.on
|
||||
|
||||
/datum/ship_engine/thermal/toggle()
|
||||
..()
|
||||
var/obj/machinery/atmospherics/unary/engine/E = engine
|
||||
E.on = !E.on
|
||||
|
||||
//Actual thermal nozzle engine object
|
||||
|
||||
/obj/machinery/atmospherics/unary/engine
|
||||
name = "engine nozzle"
|
||||
desc = "Simple thermal nozzle, uses heated gast to propell the ship."
|
||||
icon = 'icons/obj/ship_engine.dmi'
|
||||
icon_state = "nozzle"
|
||||
var/on = 1
|
||||
var/thrust_limit = 1 //Value between 1 and 0 to limit the resulting thrust
|
||||
var/nominal_thrust = 3000
|
||||
var/effective_pressure = 3000
|
||||
var/datum/ship_engine/thermal/controller
|
||||
|
||||
/obj/machinery/atmospherics/unary/engine/Initialize()
|
||||
. = ..()
|
||||
controller = new(src)
|
||||
|
||||
/obj/machinery/atmospherics/unary/engine/Destroy()
|
||||
..()
|
||||
controller.die()
|
||||
|
||||
/obj/machinery/atmospherics/unary/engine/proc/burn()
|
||||
if (!on)
|
||||
return
|
||||
if(air_contents.temperature > 0)
|
||||
var/transfer_moles = 100 * air_contents.volume/max(air_contents.temperature * R_IDEAL_GAS_EQUATION, 0,01)
|
||||
transfer_moles = round(thrust_limit * transfer_moles, 0.01)
|
||||
if(transfer_moles > air_contents.total_moles)
|
||||
on = !on
|
||||
return 0
|
||||
|
||||
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
|
||||
|
||||
loc.assume_air(removed)
|
||||
if(air_contents.temperature > PHORON_MINIMUM_BURN_TEMPERATURE)
|
||||
var/exhaust_dir = reverse_direction(dir)
|
||||
var/turf/T = get_step(src,exhaust_dir)
|
||||
if(T)
|
||||
new/obj/effect/engine_exhaust(T,exhaust_dir,air_contents.temperature)
|
||||
return 1
|
||||
|
||||
//Exhaust effect
|
||||
/obj/effect/engine_exhaust
|
||||
name = "engine exhaust"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "exhaust"
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/engine_exhaust/Initialize(var/ml, var/ndir, var/temp)
|
||||
set_dir(ndir)
|
||||
. = ..()
|
||||
if(isturf(loc))
|
||||
var/turf/nloc = turf
|
||||
nloc.hotspot_expose(temp,125)
|
||||
QDEL_IN(2 SECONDS)
|
||||
@@ -6,6 +6,7 @@
|
||||
in_space = TRUE
|
||||
|
||||
/obj/effect/overmap/visitable/sector/temporary/Initialize()
|
||||
<<<<<<< HEAD
|
||||
if(!istype(loc, /turf/unsimulated/map))
|
||||
CRASH("Attempt to create deepspace which is not on overmap: [log_info_line(loc)]")
|
||||
// Tell sector initializer where are is where we want to be.
|
||||
@@ -15,6 +16,16 @@
|
||||
map_z += global.using_map.get_empty_zlevel()
|
||||
. = ..()
|
||||
testing("Temporary sector at [x],[y],[z] was created, corresponding zlevel is [english_list(map_z)].")
|
||||
=======
|
||||
. = ..()
|
||||
|
||||
if(!map_z[1])
|
||||
log_and_message_admins("Could not create empty sector at [x], [y]. No available z levels to allocate.")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
map_sectors["[map_z[1]]"] = src
|
||||
testing("Temporary sector at [x],[y] was created, corresponding zlevel is [map_z[1]].")
|
||||
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
|
||||
|
||||
/obj/effect/overmap/visitable/sector/temporary/Destroy()
|
||||
for(var/zlevel in map_z)
|
||||
@@ -44,7 +55,13 @@
|
||||
var/obj/effect/overmap/visitable/sector/temporary/res = locate() in overmap_turf
|
||||
if(istype(res))
|
||||
return res
|
||||
<<<<<<< HEAD
|
||||
return new /obj/effect/overmap/visitable/sector/temporary(overmap_turf)
|
||||
=======
|
||||
res = new /obj/effect/overmap/visitable/sector/temporary(overmap_turf)
|
||||
if(!QDELETED(res))
|
||||
return res
|
||||
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
|
||||
|
||||
/atom/movable/proc/lost_in_space()
|
||||
for(var/atom/movable/AM in contents)
|
||||
|
||||
Reference in New Issue
Block a user