mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 20:43:10 +01:00
Replace /datum/gas_mixture/proc/return_pressure with XGM_PRESSURE(xgm) macro. Having such a relatively simple statement contributing proc overhead to procs called millions of times is ridiculous Rename /datum/gas_mixture/proc/zburn to react, deleting the old react which was just an alias for it. Free proc overhead Turn check_combustibility into a macro CHECK_COMBUSTIBLE(is_cmb, xgm). also rewrite it slightly so that it only needs to do one pass. Its a bit nasty so I apologize for that, but speeeeed. Delete most powernet and obj/machinery/power procs for handling power, replacing them with macros. The fact that we were unironically calling a draw_power() on APCs to call draw_power() on their terminals to call draw_power() on their powernet every single process tick was insane. Turn `between` into a macro alias for clamp() since the param order is different turn `Percent` into a macro AS_PCT Rewrite significant chunks of update_canmove so its not quite as horrifying of a proc and hopefully doesn't eat the entire mob subsystem every movement now
52 lines
1.7 KiB
Plaintext
52 lines
1.7 KiB
Plaintext
/obj/effect/overmap/visitable/sector/exoplanet/get_skybox_representation()
|
|
return skybox_image
|
|
|
|
/obj/effect/overmap/visitable/sector/exoplanet/proc/get_base_image()
|
|
var/image/base = image('icons/skybox/planet.dmi', "base[pick(1,2,3)]")
|
|
base.color = get_surface_color()
|
|
return base
|
|
|
|
/obj/effect/overmap/visitable/sector/exoplanet/proc/generate_planet_image()
|
|
skybox_image = image('icons/skybox/planet.dmi', "")
|
|
|
|
skybox_image.overlays += get_base_image()
|
|
|
|
if(istype(theme))
|
|
skybox_image.overlays += theme.get_planet_image_extra()
|
|
|
|
if (water_color) //TODO: move water levels out of randommap into exoplanet
|
|
var/image/water = image('icons/skybox/planet.dmi', "water[pick(1,2,3)]")
|
|
water.color = water_color
|
|
water.appearance_flags = DEFAULT_APPEARANCE_FLAGS | PIXEL_SCALE
|
|
water.SetTransform(rotation = rand(0, 360))
|
|
skybox_image.overlays += water
|
|
|
|
if (SAFE_XGM_PRESSURE(atmosphere) > SOUND_MINIMUM_PRESSURE)
|
|
|
|
var/atmo_color = get_atmosphere_color()
|
|
if (!atmo_color)
|
|
atmo_color = COLOR_WHITE
|
|
|
|
var/image/clouds = image('icons/skybox/planet.dmi', "clouds[pick(1,2,3)]")
|
|
clouds.color = atmo_color
|
|
skybox_image.overlays += clouds
|
|
|
|
|
|
var/image/shadow = image('icons/skybox/planet.dmi', "shadow[pick(1,2,3)]")
|
|
shadow.blend_mode = BLEND_MULTIPLY
|
|
skybox_image.overlays += shadow
|
|
|
|
|
|
if (prob(ring_chance))
|
|
var/image/rings = image('icons/skybox/planet_rings.dmi')
|
|
rings.icon_state = pick("sparse", "dense")
|
|
rings.color = pick("#f0fcff", "#dcc4ad", "#d1dcad", "#adb8dc")
|
|
rings.pixel_x = -128
|
|
rings.pixel_y = -128
|
|
skybox_image.overlays += rings
|
|
|
|
skybox_image.pixel_x = rand(0,64)
|
|
skybox_image.pixel_y = rand(128,256)
|
|
skybox_image.appearance_flags = DEFAULT_APPEARANCE_FLAGS | RESET_COLOR
|
|
skybox_image.blend_mode = BLEND_OVERLAY
|