Skip to content

Commit

Permalink
Merge pull request #96 from NebulaSS13/dev
Browse files Browse the repository at this point in the history
Updating Pyrelight from Neb dev.
  • Loading branch information
MistakeNot4892 authored Oct 9, 2024
2 parents ed6830b + bd94d10 commit 79f868f
Show file tree
Hide file tree
Showing 347 changed files with 4,437 additions and 3,291 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:

jobs:
DreamChecker:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup Cache
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
chmod +x send.sh
./send.sh failure $WEBHOOK_URL
OpenDream:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Python setup
Expand All @@ -73,7 +73,7 @@ jobs:
- name: Run OpenDream
run: ./DMCompiler_linux-x64/DMCompiler nebula.dme --suppress-unimplemented --skip-anything-typecheck --version=${BYOND_MAJOR}.${BYOND_MINOR} | python tools/od_annotator/__main__.py "$@"
Code:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup Cache
Expand All @@ -99,7 +99,7 @@ jobs:
chmod +x send.sh
./send.sh failure $WEBHOOK_URL
Maps:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
map_path: [example, tradeship, exodus, ministation, shaded_hills, away_sites_testing, modpack_testing, planets_testing]
Expand Down
45 changes: 23 additions & 22 deletions code/__defines/_planes+layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,31 +91,32 @@ What is the naming convention for planes or layers?
#define ABOVE_WIRE_LAYER 1.58
//TURF PLANE
//TURF_LAYER = 2
#define TURF_DETAIL_LAYER 2.01
#define TURF_SHADOW_LAYER 2.02
#define TURF_OVER_EDGE_LAYER TURF_LAYER + (FLOOR_LAYER_CONSTANT*100)
#define TURF_DETAIL_LAYER TURF_OVER_EDGE_LAYER + 0.01
#define TURF_SHADOW_LAYER TURF_OVER_EDGE_LAYER + 0.02
//ABOVE TURF
#define DECAL_LAYER 2.03
#define RUNE_LAYER 2.04
#define AO_LAYER 2.045
#define ABOVE_TILE_LAYER 2.05
#define EXPOSED_PIPE_LAYER 2.06
#define EXPOSED_WIRE_LAYER 2.07
#define EXPOSED_WIRE_TERMINAL_LAYER 2.08
#define CATWALK_LAYER 2.09
#define BLOOD_LAYER 2.10
#define MOUSETRAP_LAYER 2.11
#define PLANT_LAYER 2.12
#define DECAL_LAYER TURF_OVER_EDGE_LAYER + 0.03
#define RUNE_LAYER TURF_OVER_EDGE_LAYER + 0.04
#define AO_LAYER TURF_OVER_EDGE_LAYER + 0.045
#define ABOVE_TILE_LAYER TURF_OVER_EDGE_LAYER + 0.05
#define EXPOSED_PIPE_LAYER TURF_OVER_EDGE_LAYER + 0.06
#define EXPOSED_WIRE_LAYER TURF_OVER_EDGE_LAYER + 0.07
#define EXPOSED_WIRE_TERMINAL_LAYER TURF_OVER_EDGE_LAYER + 0.08
#define CATWALK_LAYER TURF_OVER_EDGE_LAYER + 0.09
#define BLOOD_LAYER TURF_OVER_EDGE_LAYER + 0.10
#define MOUSETRAP_LAYER TURF_OVER_EDGE_LAYER + 0.11
#define PLANT_LAYER TURF_OVER_EDGE_LAYER + 0.12
//HIDING MOB
#define HIDING_MOB_LAYER 2.14
#define SHALLOW_FLUID_LAYER 2.15
#define MOB_SHADOW_LAYER 2.16
#define HIDING_MOB_LAYER TURF_OVER_EDGE_LAYER + 0.14
#define SHALLOW_FLUID_LAYER TURF_OVER_EDGE_LAYER + 0.15
#define MOB_SHADOW_LAYER TURF_OVER_EDGE_LAYER + 0.16
//OBJ
#define BELOW_DOOR_LAYER 2.17
#define OPEN_DOOR_LAYER 2.18
#define BELOW_TABLE_LAYER 2.19
#define TABLE_LAYER 2.20
#define BELOW_OBJ_LAYER 2.21
#define STRUCTURE_LAYER 2.22
#define BELOW_DOOR_LAYER TURF_OVER_EDGE_LAYER + 0.17
#define OPEN_DOOR_LAYER TURF_OVER_EDGE_LAYER + 0.18
#define BELOW_TABLE_LAYER TURF_OVER_EDGE_LAYER + 0.19
#define TABLE_LAYER TURF_OVER_EDGE_LAYER + 0.20
#define BELOW_OBJ_LAYER TURF_OVER_EDGE_LAYER + 0.21
#define STRUCTURE_LAYER TURF_OVER_EDGE_LAYER + 0.22
// OBJ_LAYER 3
#define ABOVE_OBJ_LAYER 3.01
#define CLOSED_DOOR_LAYER 3.02
Expand Down
28 changes: 18 additions & 10 deletions code/__defines/bodytype.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#define BODY_FLAG_EXCLUDE BITFLAG(0)
#define BODY_FLAG_HUMANOID BITFLAG(1)
#define BODY_FLAG_MONKEY BITFLAG(2)
#define BODY_FLAG_QUADRUPED BITFLAG(3)

#define BODYTYPE_HUMANOID "humanoid body"
#define BODYTYPE_QUADRUPED "quadruped body"
Expand All @@ -20,9 +16,21 @@
#define HAS_A_SKIN_TONE (HAS_SKIN_TONE_NORMAL | HAS_SKIN_TONE_GRAV | HAS_SKIN_TONE_SPCR | HAS_SKIN_TONE_TRITON) // Bodytype has a numeric skintone

// Bodytype feature flags
#define BODY_FLAG_NO_DNA BITFLAG(0) // Does not create DNA. Replaces SPECIES_FLAG_NO_SCAN.
#define BODY_FLAG_NO_PAIN BITFLAG(1) // Cannot suffer halloss/recieves deceptive health indicator.
#define BODY_FLAG_NO_EAT BITFLAG(2) // Cannot eat food/drink drinks even if a stomach organ is present.
#define BODY_FLAG_CRYSTAL_REFORM BITFLAG(3) // Can regenerate missing limbs from mineral baths.
#define BODY_FLAG_NO_STASIS BITFLAG(4) // Does not experience stasis effects (sleeper, cryo)
#define BODY_FLAG_NO_DEFIB BITFLAG(5) // Cannot be revived with a defibrilator.
/// Does not create DNA. Replaces SPECIES_FLAG_NO_SCAN.
#define BODY_FLAG_NO_DNA BITFLAG(0)
/// Cannot suffer halloss/recieves deceptive health indicator.
#define BODY_FLAG_NO_PAIN BITFLAG(1)
/// Cannot eat food/drink drinks even if a stomach organ is present.
#define BODY_FLAG_NO_EAT BITFLAG(2)
/// Can regenerate missing limbs from mineral baths.
#define BODY_FLAG_CRYSTAL_REFORM BITFLAG(3)
/// Does not experience stasis effects (sleeper, cryo)
#define BODY_FLAG_NO_STASIS BITFLAG(4)
/// Cannot be revived with a defibrilator.
#define BODY_FLAG_NO_DEFIB BITFLAG(5)

// Equipment flags for gear and accessory restrictions
#define BODY_EQUIP_FLAG_EXCLUDE BITFLAG(0)
#define BODY_EQUIP_FLAG_HUMANOID BITFLAG(1)
#define BODY_EQUIP_FLAG_MONKEY BITFLAG(2)
#define BODY_EQUIP_FLAG_QUADRUPED BITFLAG(3)
31 changes: 16 additions & 15 deletions code/__defines/turfs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,19 @@
///Helper macro for printing to text the world's x,y,z size to a string.
#define WORLD_SIZE_TO_STRING "[world.maxx]x[world.maxy]x[world.maxz]"

#define EXT_LAYER_CONSTANT 0.001
#define EXT_EDGE_OCEAN (10 * EXT_LAYER_CONSTANT)
#define EXT_EDGE_SEAFLOOR (11 * EXT_LAYER_CONSTANT)
#define EXT_EDGE_VOLCANIC (12 * EXT_LAYER_CONSTANT)
#define EXT_EDGE_DIRT (20 * EXT_LAYER_CONSTANT)
#define EXT_EDGE_BARREN (21 * EXT_LAYER_CONSTANT)
#define EXT_EDGE_CLAY (21 * EXT_LAYER_CONSTANT)
#define EXT_EDGE_MUD (22 * EXT_LAYER_CONSTANT)
#define EXT_EDGE_SAND (30 * EXT_LAYER_CONSTANT)
#define EXT_EDGE_CHLORINE_SAND (31 * EXT_LAYER_CONSTANT)
#define EXT_EDGE_WATER (40 * EXT_LAYER_CONSTANT)
#define EXT_EDGE_GRASS (51 * EXT_LAYER_CONSTANT)
#define EXT_EDGE_PATH (52 * EXT_LAYER_CONSTANT)
#define EXT_EDGE_GRASS_WILD (53 * EXT_LAYER_CONSTANT)
#define EXT_EDGE_SNOW (60 * EXT_LAYER_CONSTANT)
#define FLOOR_EDGE_NONE -1
#define FLOOR_LAYER_CONSTANT 0.001
#define FLOOR_LAYER_OCEAN (10 * FLOOR_LAYER_CONSTANT)
#define FLOOR_EDGE_SEAFLOOR (11 * FLOOR_LAYER_CONSTANT)
#define FLOOR_EDGE_VOLCANIC (12 * FLOOR_LAYER_CONSTANT)
#define FLOOR_EDGE_DIRT (20 * FLOOR_LAYER_CONSTANT)
#define FLOOR_EDGE_BARREN (21 * FLOOR_LAYER_CONSTANT)
#define FLOOR_EDGE_CLAY (21 * FLOOR_LAYER_CONSTANT)
#define FLOOR_EDGE_MUD (22 * FLOOR_LAYER_CONSTANT)
#define FLOOR_EDGE_SAND (30 * FLOOR_LAYER_CONSTANT)
#define FLOOR_EDGE_CHLORINE_SAND (50 * FLOOR_LAYER_CONSTANT)
#define FLOOR_EDGE_WATER (50 * FLOOR_LAYER_CONSTANT)
#define FLOOR_EDGE_GRASS (55 * FLOOR_LAYER_CONSTANT)
#define FLOOR_EDGE_PATH (60 * FLOOR_LAYER_CONSTANT)
#define FLOOR_EDGE_GRASS_WILD (65 * FLOOR_LAYER_CONSTANT)
#define FLOOR_EDGE_SNOW (70 * FLOOR_LAYER_CONSTANT)
12 changes: 11 additions & 1 deletion code/_global_vars/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,18 @@ var/global/list/light_strike_sound = list(
'sound/effects/hit_kick.ogg',
'sound/effects/hit_punch.ogg'
)

var/global/list/tray_hit_sound = list(
'sound/items/trayhit1.ogg',
'sound/items/trayhit2.ogg'
)

var/global/list/sweeping_sound = list(
'sound/foley/sweeping1.ogg',
'sound/foley/sweeping2.ogg',
'sound/foley/sweeping3.ogg',
'sound/foley/sweeping4.ogg',
'sound/foley/sweeping5.ogg',
'sound/foley/sweeping6.ogg',
'sound/foley/sweeping7.ogg',
)
25 changes: 10 additions & 15 deletions code/_helpers/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@
return L

// Returns a list of mobs and/or objects in range of R from source. Used in radio and say code.

/proc/get_mobs_or_objects_in_view(var/R, var/atom/source, var/include_mobs = 1, var/include_objects = 1)

var/turf/T = get_turf(source)
Expand All @@ -195,28 +194,24 @@
hear += I
return hear

/proc/get_mobs_and_objs_in_view_fast(var/turf/T, var/range, var/list/mobs, var/list/objs, var/check_ghosts = null)
var/list/hear = list()
DVIEW(hear, range, T, INVISIBILITY_MAXIMUM)
// Alternative to get_mobs_or_objects_in_view which only considers mobs and "listening" objects.
/proc/get_listeners_in_range(turf/center, range, list/mobs, list/objs, check_ghosts=FALSE)
var/list/hearturfs = list()

for(var/atom/movable/AM in hear)
if(ismob(AM))
mobs += AM
hearturfs += get_turf(AM)
else if(isobj(AM))
objs += AM
hearturfs += get_turf(AM)
FOR_DVIEW(var/turf/T, range, center, INVISIBILITY_MAXIMUM)
hearturfs[T] = TRUE
for(var/mob/M in T)
mobs += M
END_FOR_DVIEW

for(var/mob/M in global.player_list)
if(check_ghosts && M.stat == DEAD && M.get_preference_value(check_ghosts) != PREF_NEARBY)
mobs |= M
else if(get_turf(M) in hearturfs)
else if(hearturfs[get_turf(M)])
mobs |= M

for(var/obj/O in global.listening_objects)
if(get_turf(O) in hearturfs)
objs |= O
if(hearturfs[get_turf(O)])
objs += O



Expand Down
1 change: 0 additions & 1 deletion code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ avoid code duplication. This includes items that may sometimes act as a standard
devour(used_item)
return TRUE


// Proximity_flag is 1 if this afterattack was called on something adjacent, in your square, or on your person.
// Click parameters is the params string from byond Click() code, see that documentation.
/obj/item/proc/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
Expand Down
3 changes: 3 additions & 0 deletions code/controllers/subsystems/garbage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ SUBSYSTEM_DEF(garbage)
if(isnull(D))
return

if(D.is_processing)
get_stack_trace("[D] ([D.type]) was qdeleted while still processing on [D.is_processing]!")

switch(hint)
if (QDEL_HINT_QUEUE) //qdel should queue the object for deletion.
GC_CHECK_AM_NULLSPACE(D, "QDEL_HINT_QUEUE")
Expand Down
2 changes: 2 additions & 0 deletions code/datums/ai/passive.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
var/scooping_skill_req = SKILL_ADEPT

/datum/mob_controller/passive/scooped_by(mob/living/initiator)
if(body.stat != CONSCIOUS)
return TRUE
if(is_friend(initiator))
return TRUE
if(is_enemy(initiator) || (scooping_skill && initiator.skill_fail_prob(scooping_skill, 50, scooping_skill_req))) // scary, try to wriggle away
Expand Down
38 changes: 38 additions & 0 deletions code/datums/extensions/demolisher/_demolisher.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// A subtype for items that can dismantle/demolish non-reinforced non-natural walls.
/datum/extension/demolisher
base_type = /datum/extension/demolisher
expected_type = /obj/item
var/demolish_delay = 6 SECONDS
var/demolish_verb
var/demolish_sound

/datum/extension/demolisher/New(datum/holder, _delay, _verb, _sound)
. = ..()
if(_delay)
demolish_delay = _delay
if(_verb)
demolish_verb = _verb
if(_sound)
demolish_sound = _sound

/datum/extension/demolisher/proc/get_demolish_delay(turf/wall/wall)
return demolish_delay + wall?.get_material()?.cut_delay

/datum/extension/demolisher/proc/get_demolish_verb()
return demolish_verb

/datum/extension/demolisher/proc/get_demolish_sound()
return demolish_sound

/datum/extension/demolisher/proc/try_demolish(mob/user, turf/wall/wall)
var/dismantle_verb = get_demolish_verb()
var/dismantle_sound = get_demolish_sound()
to_chat(user, SPAN_NOTICE("You begin [dismantle_verb] \the [wall]."))
if(dismantle_sound)
playsound(wall, dismantle_sound, 100, 1)
var/cut_delay = max(0, get_demolish_delay(wall))
if(do_after(user, cut_delay, wall))
to_chat(user, SPAN_NOTICE("You finish [dismantle_verb] \the [wall]."))
user.visible_message(SPAN_DANGER("\The [user] finishes [dismantle_verb] \the [wall]!"))
wall.dismantle_turf()
return TRUE
13 changes: 13 additions & 0 deletions code/datums/extensions/demolisher/delicate.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/datum/extension/demolisher/delicate
demolish_verb = "dismantling"
demolish_sound = 'sound/items/Crowbar.ogg'
var/alternative_tools = "a sledgehammer or welding torch" // For overriding on medieval maps.

/datum/extension/demolisher/delicate/try_demolish(mob/user, turf/wall/wall)
if(!(wall.get_material()?.removed_by_welder))
return ..()
to_chat(user, SPAN_WARNING("\The [wall] is too robust to be dismantled with \the [holder]; try [alternative_tools]."))
return TRUE

/datum/extension/demolisher/delicate/get_demolish_delay(turf/wall/wall)
return ..() * 1.2
16 changes: 16 additions & 0 deletions code/datums/extensions/demolisher/energy.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/datum/extension/demolisher/energy
demolish_sound = "sparks"
demolish_verb = "slicing through"

/datum/extension/demolisher/energy/try_demolish(mob/user, turf/wall/wall)
var/obj/item/tool = holder
if(!tool.is_special_cutting_tool())
return FALSE
if(istype(tool, /obj/item/gun/energy/plasmacutter))
var/obj/item/gun/energy/plasmacutter/cutter = tool
if(!cutter.slice(user))
return TRUE
return ..()

/datum/extension/demolisher/energy/get_demolish_delay(turf/wall/wall)
return ..() * 0.5
22 changes: 22 additions & 0 deletions code/datums/extensions/demolisher/pick.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/datum/extension/demolisher/pick
demolish_verb = "dismantling"
demolish_sound = 'sound/items/Crowbar.ogg'

/datum/extension/demolisher/pick/try_demolish(mob/user, turf/wall/wall)
var/obj/item/pick = holder
if(pick.material?.hardness < wall.get_material()?.hardness)
to_chat(user, SPAN_WARNING("\The [holder] is not hard enough to cut through [wall.get_material().solid_name]."))
return TRUE
return ..()

/datum/extension/demolisher/pick/get_demolish_delay(turf/wall/wall)
var/obj/item/pick = holder
return pick.get_expected_tool_use_delay(TOOL_PICK, ..())

/datum/extension/demolisher/pick/get_demolish_verb()
var/obj/item/pick = holder
return pick.get_tool_message(TOOL_PICK)

/datum/extension/demolisher/pick/get_demolish_sound()
var/obj/item/pick = holder
return pick.get_tool_sound(TOOL_PICK)
16 changes: 16 additions & 0 deletions code/datums/extensions/demolisher/welder.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/datum/extension/demolisher/welder
demolish_verb = "cutting through"
demolish_sound = 'sound/items/Welder.ogg'
expected_type = /obj/item/weldingtool

/datum/extension/demolisher/welder/try_demolish(mob/user, turf/wall/wall)
if(!(wall.get_material()?.removed_by_welder))
to_chat(user, SPAN_WARNING("\The [wall] is too delicate to be dismantled with \the [holder]; try a hammer or crowbar."))
return TRUE
var/obj/item/weldingtool/welder = holder
if(welder.weld(0,user))
return ..()
return TRUE

/datum/extension/demolisher/welder/get_demolish_delay(turf/wall/wall)
return ..() * 0.7
3 changes: 2 additions & 1 deletion code/datums/extensions/milkable/milkable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
START_PROCESSING(SSprocessing, src)

/datum/extension/milkable/Destroy()
STOP_PROCESSING(SSprocessing, src)
QDEL_NULL(udder)
return ..()

Expand Down Expand Up @@ -86,7 +87,7 @@
SPAN_NOTICE("\The [user] starts milking \the [critter] into \the [container]."),
SPAN_NOTICE("You start milking \the [critter] into \the [container].")
)
if(!user.do_skilled(4 SECONDS, milking_skill))
if(!user.do_skilled(4 SECONDS, milking_skill, target = critter, check_holding = TRUE))
user.visible_message(
SPAN_NOTICE("\The [user] stops milking \the [critter]."),
SPAN_NOTICE("You stop milking \the [critter].")
Expand Down
4 changes: 4 additions & 0 deletions code/datums/extensions/shearable/shearable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
fleece_material = GET_DECL(fleece_material)
START_PROCESSING(SSprocessing, src)

/datum/extension/shearable/Destroy()
STOP_PROCESSING(SSprocessing, src)
return ..()

/datum/extension/shearable/Process()
if(has_fleece)
return PROCESS_KILL
Expand Down
Loading

0 comments on commit 79f868f

Please sign in to comment.