Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bullet rework #1

Merged
merged 175 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
42d87af
d
MLGTASTICa Apr 12, 2023
80d495e
z
MLGTASTICa Apr 12, 2023
fbab5c0
Update bullets.dm
MLGTASTICa Apr 12, 2023
1679e71
Update bullets.dm
MLGTASTICa Apr 12, 2023
1a615e9
j
MLGTASTICa Apr 12, 2023
672f267
Update cev_eris.dme
MLGTASTICa Apr 12, 2023
893b316
Update subsystems.dm
MLGTASTICa Apr 12, 2023
60e2d6a
Update bullets.dm
MLGTASTICa Apr 12, 2023
aa5de6e
Update bullets.dm
MLGTASTICa Apr 13, 2023
01e9aa5
Update bullets.dm
MLGTASTICa Apr 13, 2023
d71edef
E
MLGTASTICa Apr 13, 2023
53c832a
Update bullets.dm
MLGTASTICa Apr 14, 2023
52d8759
Update bullets.dm
MLGTASTICa Apr 14, 2023
773abe8
Update bullets.dm
MLGTASTICa Apr 14, 2023
d86f0c3
Update bullets.dm
MLGTASTICa Apr 16, 2023
6a0c13e
Update bullets.dm
MLGTASTICa Apr 16, 2023
251badc
z
MLGTASTICa Apr 16, 2023
f5a8484
dzz
MLGTASTICa Apr 16, 2023
833fe01
proper support for multi-Z shooting + multi-Z angles.
MLGTASTICa Apr 17, 2023
0395ebb
Update bullets.dm
MLGTASTICa Apr 17, 2023
57b23df
z
MLGTASTICa Apr 17, 2023
fa334be
kk
MLGTASTICa Apr 30, 2023
a6e3ee3
Update bullets.dm
MLGTASTICa May 1, 2023
e2b9191
Update bullets.dm
MLGTASTICa May 1, 2023
c1f41d1
Update bullets.dm
MLGTASTICa May 4, 2023
ee8fab3
Update bullets.dm
MLGTASTICa Jun 2, 2023
3543884
hhh
MLGTASTICa Jan 20, 2024
07db701
Merge branch 'master' into cooler-richochets
MLGTASTICa Jan 20, 2024
90b27fc
more fixes
MLGTASTICa Jan 20, 2024
a7bff51
Merge branch 'cooler-richochets' of https://github.com/MLGTASTICa/AEV…
MLGTASTICa Jan 20, 2024
467a73d
a
MLGTASTICa Jan 31, 2024
1386296
Agony
MLGTASTICa Feb 14, 2024
acf8196
a
MLGTASTICa Feb 14, 2024
80703fd
Update bullets.dm
MLGTASTICa Feb 16, 2024
506e53f
Revert "Update bullets.dm"
MLGTASTICa Feb 16, 2024
927500c
Update bullets.dm
MLGTASTICa Feb 16, 2024
f00f21f
aaaa
MLGTASTICa Feb 16, 2024
dae899c
Update bullets.dm
MLGTASTICa Feb 20, 2024
70ec751
iteration numero 4(it works almost proper)
MLGTASTICa Feb 21, 2024
65c7dcf
aaaaaaaaaaaah
MLGTASTICa Feb 23, 2024
4f9c693
Update bullets.dm
MLGTASTICa Feb 23, 2024
d3ffc37
aaaaaaaaaaaaah
MLGTASTICa Feb 24, 2024
8a6bc73
k
MLGTASTICa Feb 25, 2024
a485db3
a
MLGTASTICa Feb 25, 2024
b75ff60
AAAAAAAAAAAAAAAAAAJ
MLGTASTICa Feb 25, 2024
c6a284a
Update datum_click_handlers.dm
MLGTASTICa Feb 26, 2024
775210c
sss
MLGTASTICa Feb 26, 2024
9c398af
THE FIX
MLGTASTICa Feb 26, 2024
090d019
h
MLGTASTICa Feb 27, 2024
ec8cf5e
aaah
MLGTASTICa Feb 27, 2024
ec8db24
aaaaaaah
MLGTASTICa Feb 28, 2024
9b67518
perfect bounces.
MLGTASTICa Feb 28, 2024
00ba90e
e
MLGTASTICa Feb 28, 2024
415b6a0
h
MLGTASTICa Feb 28, 2024
61e96b2
Update projectile.dm
MLGTASTICa Feb 28, 2024
7ec4270
;
MLGTASTICa Feb 28, 2024
f55c654
Update bullets.dm
MLGTASTICa Feb 28, 2024
f45a0c2
Revert "Update bullets.dm"
MLGTASTICa Feb 29, 2024
32ea58a
Revert ";"
MLGTASTICa Feb 29, 2024
e44ccfb
Revert "Revert ";""
MLGTASTICa Feb 29, 2024
86a92b3
AT LAST...
MLGTASTICa Feb 29, 2024
a64efeb
AAAAH
MLGTASTICa Mar 1, 2024
da4f28f
fixes
MLGTASTICa Mar 1, 2024
e6343db
aa
MLGTASTICa Mar 4, 2024
4836d70
z
MLGTASTICa Mar 13, 2024
0cfd754
Merge branch 'master' into cooler-richochets
MLGTASTICa Apr 3, 2024
ee36692
Update bullets.dm
MLGTASTICa Apr 3, 2024
b20daa9
colofull litle parantheses
MLGTASTICa Apr 3, 2024
1ebf84d
shitcode begoneus
MLGTASTICa Apr 3, 2024
62fdb9f
aaaa
MLGTASTICa Apr 3, 2024
c6375ef
Update hostile.dm
MLGTASTICa Apr 3, 2024
7f67816
optimizations for dir blocked
MLGTASTICa Apr 4, 2024
c211be1
a
MLGTASTICa Apr 7, 2024
c00ee24
Update deployable.dm
MLGTASTICa Apr 7, 2024
147c764
mj
MLGTASTICa Apr 7, 2024
870e55f
j
MLGTASTICa Apr 7, 2024
c38ab2d
fix
MLGTASTICa Apr 7, 2024
29af836
Update structures.dm
MLGTASTICa Apr 7, 2024
f82e002
a
MLGTASTICa Apr 9, 2024
94cbcf6
improved but still not good
MLGTASTICa Apr 12, 2024
5cc542d
a
MLGTASTICa May 2, 2024
6e4aec8
aaaah
MLGTASTICa May 2, 2024
0345366
a
MLGTASTICa May 2, 2024
4957b42
qa
MLGTASTICa May 3, 2024
73dca56
visual effecs for hitting and more
MLGTASTICa May 3, 2024
866587b
a
MLGTASTICa May 4, 2024
b22fe4a
a
MLGTASTICa May 4, 2024
fda01e2
banish bump , force subystem to scan turfs , start hitboxes.
MLGTASTICa May 5, 2024
ed906cc
Update hitbox_datums.dm
MLGTASTICa May 6, 2024
cd494f2
aa hitbox
MLGTASTICa May 7, 2024
0864611
hitboxes & intersection first attempt
MLGTASTICa May 7, 2024
784aaf2
a new commit before i go on another system.
MLGTASTICa May 8, 2024
2824e44
hhh
MLGTASTICa May 8, 2024
2287906
aaaaaaaaaaah
MLGTASTICa May 8, 2024
40809ef
Update bullets.dm
MLGTASTICa May 9, 2024
f339e08
a
MLGTASTICa May 9, 2024
88acaf1
aaaaaaaaah
MLGTASTICa May 11, 2024
4b9df05
i love hitboxes & trigonometry (!)
MLGTASTICa May 11, 2024
9ffaaf7
more fixes ,human hitbox and proper visualization
MLGTASTICa May 13, 2024
3c1ec68
Merge branch 'master' into cooler-richochets
MLGTASTICa May 18, 2024
6d9e61d
kk
MLGTASTICa May 18, 2024
f9e17cf
a
MLGTASTICa May 18, 2024
957c100
better hitbox
MLGTASTICa May 18, 2024
a940314
aah
MLGTASTICa May 18, 2024
f62e752
sss
MLGTASTICa May 19, 2024
26fc2b1
aaa
MLGTASTICa May 19, 2024
0712a44
kk
MLGTASTICa May 19, 2024
bbcaf2e
complete implementation . at last.. humans fully hitboxed..
MLGTASTICa May 19, 2024
f64a072
A
MLGTASTICa May 20, 2024
e33346a
aa
MLGTASTICa May 20, 2024
0e99fd5
aa
MLGTASTICa May 21, 2024
46a1451
the changez
MLGTASTICa May 21, 2024
3b41ee4
aaaa
MLGTASTICa May 22, 2024
25d0383
aa
MLGTASTICa May 23, 2024
639fffe
k
MLGTASTICa May 23, 2024
6d122e4
AAAAAA
MLGTASTICa May 25, 2024
5006a67
even more sutfff
MLGTASTICa May 25, 2024
62302e7
the endless fight to get this shit done. nothing escapes the churn...
MLGTASTICa May 25, 2024
1fd720a
a
MLGTASTICa Jun 28, 2024
551e8d3
aaa
MLGTASTICa Jul 12, 2024
63c7011
mroe fun mechanics
MLGTASTICa Jul 13, 2024
172d0e6
aa
MLGTASTICa Jul 15, 2024
92b7fcf
aaaaaaaaaaafawfa
MLGTASTICa Jul 16, 2024
e4f6c3e
aa
MLGTASTICa Jul 16, 2024
dfbaad5
Update _compile_options.dm
MLGTASTICa Jul 21, 2024
4d101fd
Stuff
MLGTASTICa Jul 27, 2024
ce43d97
Soul-draining work of fixing physics , aeough
MLGTASTICa Jul 29, 2024
b6fa227
attachment Framework part 1
MLGTASTICa Aug 1, 2024
35cc46f
Finish removal of simulated
MLGTASTICa Aug 1, 2024
373f940
Move hitboxes to all atoms and remove redundant var
MLGTASTICa Aug 1, 2024
67d1dad
Map fixed , eris saved.
MLGTASTICa Aug 2, 2024
11112a0
Special flag.
MLGTASTICa Aug 2, 2024
b81a2c3
copin and trying
MLGTASTICa Aug 3, 2024
2b3f165
agony and bugs
MLGTASTICa Aug 3, 2024
c7accad
the grind continues
MLGTASTICa Aug 4, 2024
ff0b320
fuck i have to rewrite all of this crap
MLGTASTICa Aug 6, 2024
9dd2162
save progress
MLGTASTICa Aug 6, 2024
9268337
more code
MLGTASTICa Aug 6, 2024
e913ba0
aAAA
MLGTASTICa Aug 7, 2024
927b2e6
AAAAAAAAAAG
MLGTASTICa Aug 8, 2024
6483577
agny
MLGTASTICa Aug 9, 2024
3564455
Update bullets.dm
MLGTASTICa Aug 9, 2024
83bfc70
Revert "Update bullets.dm"
MLGTASTICa Aug 9, 2024
57935d6
a
MLGTASTICa Aug 9, 2024
6692f96
ITS FULLY ACCURTE NOW THANK GOGDDA HAHA
MLGTASTICa Aug 9, 2024
300b588
it mothafucking works it works it works
MLGTASTICa Aug 10, 2024
ce4f531
more support for more special hitboxes
MLGTASTICa Aug 10, 2024
be7646d
a
MLGTASTICa Aug 11, 2024
1701457
debugging utilities + hitbox for power cables.
MLGTASTICa Aug 11, 2024
5ffee2b
Rebruh
MLGTASTICa Aug 11, 2024
429fe4a
a
MLGTASTICa Aug 11, 2024
53d2424
THIS NAMING MISTAKE COST ME 4 HOURS I FUCKINGU AHWUAUFHAFA
MLGTASTICa Aug 11, 2024
9b8b141
Update hitbox_datums.dm
MLGTASTICa Aug 11, 2024
338726c
A
MLGTASTICa Aug 11, 2024
b35fae7
aaa
MLGTASTICa Aug 12, 2024
04b978a
more hitboxes & shit
MLGTASTICa Aug 12, 2024
7a99cae
THE changes.
MLGTASTICa Aug 13, 2024
63826d5
fix the mapping mistkaes
MLGTASTICa Aug 13, 2024
cfa84d9
add
MLGTASTICa Aug 13, 2024
5176c8d
Remap ext inguishers
MLGTASTICa Aug 13, 2024
c8f947c
HITBOXES GALORE
MLGTASTICa Aug 13, 2024
3f445db
the hitbox hell continues
MLGTASTICa Aug 14, 2024
cb07448
even more hitbxes & fxes & shit
MLGTASTICa Aug 14, 2024
9f227cd
even omre hitboxes & features.
MLGTASTICa Aug 14, 2024
b4bb425
more fixes & shit
MLGTASTICa Aug 15, 2024
a486c1f
working vision , toolkit and mecha crusher.
MLGTASTICa Aug 16, 2024
1b67703
table buttons
MLGTASTICa Aug 20, 2024
1997ad6
a
MLGTASTICa Aug 20, 2024
d8ca30e
mapping changes
MLGTASTICa Aug 20, 2024
8c64b61
last mods
MLGTASTICa Aug 20, 2024
6fdcdca
a
MLGTASTICa Aug 20, 2024
0ea4fd1
ah
MLGTASTICa Aug 27, 2024
c554f79
a
MLGTASTICa Sep 3, 2024
43ba46e
some new ordering standards & fixes to the fucking ordering isuses
MLGTASTICa Sep 7, 2024
659dfb0
optimizations
MLGTASTICa Sep 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 27 additions & 8 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
{
"version": "0.2.0",
"configurations": [
"version": "0.2.0",
"configurations": [
{
"type": "byond",
"request": "launch",
"name": "Launch and Build TGUI and DM",
"preLaunchTask": "TGUI Compile",
"dmb": "${workspaceFolder}/${command:CurrentDMB}"
},
{
"name": "C/C++ Runner: Debug Session",
"type": "cppdbg",
"request": "launch",
"args": [],
"stopAtEntry": false,
"externalConsole": true,
"cwd": "c:/Users/MLGTASTIC/Desktop/Eris-SS13/CEV-Eris/tgui/.yarn/unplugged/ttf2woff2-npm-4.0.4-e71f070912/node_modules/ttf2woff2/csrc/woff2",
"program": "c:/Users/MLGTASTIC/Desktop/Eris-SS13/CEV-Eris/tgui/.yarn/unplugged/ttf2woff2-npm-4.0.4-e71f070912/node_modules/ttf2woff2/csrc/woff2/build/Debug/outDebug",
"MIMode": "gdb",
"miDebuggerPath": "gdb",
"setupCommands": [
{
"type": "byond",
"request": "launch",
"name": "Launch and Build TGUI and DM",
"preLaunchTask": "TGUI Compile",
"dmb": "${workspaceFolder}/${command:CurrentDMB}"
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
]
}
]
}
5 changes: 5 additions & 0 deletions cev_eris.dme
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
#include "code\hub.dm"
#include "code\stylesheet.dm"
#include "code\world.dm"
#include "code\__DEFINES\___byondbase.dm"
#include "code\__DEFINES\__atomFlags.dm"
#include "code\__DEFINES\_bullets.dm"
#include "code\__DEFINES\_compile_options.dm"
#include "code\__DEFINES\_globals.dm"
#include "code\__DEFINES\_hydro_setup.dm"
Expand Down Expand Up @@ -89,6 +91,7 @@
#include "code\__DEFINES\verb_manager.dm"
#include "code\__DEFINES\weapons.dm"
#include "code\__DEFINES\ZAS.dm"
#include "code\__DEFINES\dcs\_attachmentFlags.dm"
#include "code\__DEFINES\dcs\flags.dm"
#include "code\__DEFINES\dcs\helpers.dm"
#include "code\__DEFINES\dcs\signals.dm"
Expand Down Expand Up @@ -227,6 +230,7 @@
#include "code\controllers\subsystems\alarm.dm"
#include "code\controllers\subsystems\assets.dm"
#include "code\controllers\subsystems\atoms.dm"
#include "code\controllers\subsystems\bullets.dm"
#include "code\controllers\subsystems\chat.dm"
#include "code\controllers\subsystems\chemistry.dm"
#include "code\controllers\subsystems\chunks.dm"
Expand Down Expand Up @@ -2410,6 +2414,7 @@
#include "code\modules\projectiles\gun.dm"
#include "code\modules\projectiles\gun_firemode.dm"
#include "code\modules\projectiles\gun_hud_actions.dm"
#include "code\modules\projectiles\hitbox_datums.dm"
#include "code\modules\projectiles\projectile.dm"
#include "code\modules\projectiles\ammunition\ammo_kits.dm"
#include "code\modules\projectiles\ammunition\boxes.dm"
Expand Down
13 changes: 13 additions & 0 deletions code/ATMOSPHERICS/atmospherics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ Pipelines + Other Objects -> Pipe network
var/obj/machinery/atmospherics/node1
var/obj/machinery/atmospherics/node2

/// Pending a full implementation of hitbox for every atom
/obj/machinery/atmospherics/bullet_act(obj/item/projectile/P, def_zone, hitboxFlags)
return PROJECTILE_CONTINUE

/obj/machinery/atmospherics/Initialize(mapload, d)
if(!icon_manager)
icon_manager = new()
Expand All @@ -58,6 +62,15 @@ Pipelines + Other Objects -> Pipe network
return
..()

/// Yes this is necesarry due to how atmos is handled
/// In a perfect world this wouldn't be necesarry
/// and i do not have the willpower to rework all of atmos yet
/// SPCR - 2024
/obj/machinery/atmospherics/proc/getHitboxData()
if(invisibility == 101)
return null
return initialize_directions

/obj/machinery/atmospherics/proc/add_underlay(var/turf/T, var/obj/machinery/atmospherics/node, var/direction, var/icon_connect_type)
if(node)
if(T && !T.is_plating() && node.level == BELOW_PLATING_LEVEL && istype(node, /obj/machinery/atmospherics/pipe))
Expand Down
1 change: 1 addition & 0 deletions code/ATMOSPHERICS/components/unary/vent_pump.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
/obj/machinery/atmospherics/unary/vent_pump/on
use_power = IDLE_POWER_USE
icon_state = "map_vent_out"
hitbox = /datum/hitboxDatum/atom/atmosphericVentScrubber

/obj/machinery/atmospherics/unary/vent_pump/siphon
pump_direction = 0
Expand Down
1 change: 1 addition & 0 deletions code/ATMOSPHERICS/components/unary/vent_scrubber.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
/obj/machinery/atmospherics/unary/vent_scrubber/on
use_power = IDLE_POWER_USE
icon_state = "map_scrubber_on"
hitbox = /datum/hitboxDatum/atom/atmosphericVentScrubber

/obj/machinery/atmospherics/unary/vent_scrubber/Initialize(mapload, d)
. = ..()
Expand Down
15 changes: 15 additions & 0 deletions code/ATMOSPHERICS/pipes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,19 @@
layer = GAS_PIPE_HIDDEN_LAYER
use_power = NO_POWER_USE

hitbox = /datum/hitboxDatum/atom/polygon/atmosphericPipe

var/alert_pressure = 80*ONE_ATMOSPHERE
//minimum pressure before check_pressure(...) should be called

/// Pending a full implementation of hitbox for every atom
/obj/machinery/atmospherics/pipe/bullet_act(obj/item/projectile/P, def_zone, hitboxFlags)
take_damage(P.get_structure_damage())
if(QDELETED(src))
return PROJECTILE_CONTINUE
return PROJECTILE_STOP


/obj/machinery/atmospherics/pipe/Initialize(mapload, d)
. = ..()
AddComponent(/datum/component/buckling, buckleFlags = BUCKLE_MOB_ONLY | BUCKLE_REQUIRE_RESTRAINTED | BUCKLE_REQUIRE_NOT_BUCKLED | BUCKLE_FORCE_LIE)
Expand Down Expand Up @@ -191,6 +201,11 @@
invisibility = i ? 101 : 0
update_icon()

/obj/machinery/atmospherics/pipe/simple/getHitboxData()
if(invisibility == 101)
return null
return initialize_directions

/obj/machinery/atmospherics/pipe/simple/Process()
if(!parent) //This should cut back on the overhead calling build_network thousands of times per cycle
..()
Expand Down
2 changes: 1 addition & 1 deletion code/ZAS/Airflow.dm
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,6 @@ obj/item/check_airflow_movable(n)
. = list()
for(var/turf/T in contents)
for(var/atom/movable/A in T)
if(!A.simulated || A.anchored || istype(A, /obj/effect) || isobserver(A))
if(A.anchored || istype(A, /obj/effect) || isobserver(A))
continue
. += A
8 changes: 8 additions & 0 deletions code/__DEFINES/___byondbase.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#define NORTH 1
#define SOUTH 2
#define EAST 4
#define WEST 8
#define LISTNORTH "1"
#define LISTSOUTH "2"
#define LISTEAST "4"
#define LISTWEST "8"
17 changes: 14 additions & 3 deletions code/__DEFINES/__atomFlags.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
/// This ATOM gets its proper icon after update icon / new has been called . This makes path2icon instantiate it and grab it from there
#define AF_ICONGRABNEEDSINSTANTATION 1<<1
#define AF_ICONGRABNEEDSINSTANTATION (1<<1)
/// This atom's layer shouldn't adjust itself
#define AF_LAYER_UPDATE_HANDLED 1<<2
#define AF_LAYER_UPDATE_HANDLED (1<<2)
/// This atom's plane shouldn't adjust itself
#define AF_PLANE_UPDATE_HANDLED 1<<3
#define AF_PLANE_UPDATE_HANDLED (1<<3)
/// This atom should be able to always move however it wants with no restrictions(used for bullets after they hit.) It also isn't counted for any interactions regarding crossing , etc.
#define AF_VISUAL_MOVE (1<<4)
/// Our hitbox is offset by an attachment.
#define AF_HITBOX_OFFSET_BY_ATTACHMENT (1<<5)
#define AF_IGNORE_ON_BULLETSCAN (1<<6)
/// This atom will get ignored by explosions
#define AF_EXPLOSION_IGNORANT (1<<8)
/// Uses the aiming level for shooting at the shooter instead.
#define AF_PASS_AIMING_LEVEL (1<<9)
/// This is a wall-mounted atom and should be treated as such on initialization.
#define AF_WALL_MOUNTED (1<<10)
41 changes: 41 additions & 0 deletions code/__DEFINES/_bullets.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/// These define the MAXIMUM height for a level (as in a standing human height is considered)
#define LEVEL_BELOW 0
#define LEVEL_TURF 3
#define LEVEL_LYING 6
#define LEVEL_LOWWALL 9
#define LEVEL_TABLE 15
#define LEVEL_LEGS 15
#define LEVEL_GROIN 20
#define LEVEL_CHEST 28
#define LEVEL_HEAD 30
#define LEVEL_ABOVE 32

// update these , using max() on defines wont give you constants
#define LEVEL_MAX 3
#define LEVEL_MIN 0

// return flags for aimingLevels ,this makes it so it uses the shooter's default aiming level , be it by their current level or def zone they are aiming at.
#define HBF_NOLEVEL -99999
#define HBF_USEMEDIAN -100000

#define PIXEL_FUDGE (1/1024)

proc/snapNum(n)
. = n
n = round(n,1)
if(abs(.-n) < PIXEL_FUDGE) . = n


// return flags for the hitboxDatum , with functionality implemented in bullet_act. passed under hitboxFlags
// these have no excuse to be general , add them for any object you want to add special functonality to with regards to where it is hit.
/// GENERAL
#define HB_AIMED 1<<1
/// mob/living/carbon/human and any subtypes
#define HB_HEAD 1<<2
#define HB_CHESTARMS 1<<3
#define HB_GROIN 1<<4
#define HB_LEGS 1<<5
// barricades and whatever object implements this
#define HB_WEAKPOINT 1<<6


36 changes: 36 additions & 0 deletions code/__DEFINES/dcs/_attachmentFlags.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

/// This denotes that we are attached to a supporting atom
#define ATFA_ATTACHED (0<<0)
/// This denotes that we are a supporting atom to the thing attached to us
#define ATFS_SUPPORTER (1<<0)

/// ATFS - Attachment flags for the supporting atom
/// DEPENDING on wheter its an attached or a supporter, the bitflags change meaning
/// If the supporter is marked for deletion/deleted , also delete the attached atoms. Default behaviour
#define ATFS_DELETE_RECURSIVE (1<<1)
/// Will detach all attached atoms and drop them on the turf
#define ATFS_DROP_ATTACHED (1<<2)
/// The supporting atom shall relay signals to all its attached atoms
#define ATFS_RELAY_SIGNALS (1<<3)
/// This will cause all attached atoms to be checked first for hitbox collisions instead of us
#define ATFS_PRIORITIZE_ATTACHED_FOR_HITS (1<<4)
/// This will make all bullets ignore the attached atom
#define ATFS_IGNORE_HITS (1<<5)

/// ATFA - Attachment flags for the attached atom
/// This denotes that we are holding onto the supporting atom.
#define ATFA_HOLDING (1<<1)
/// We can be detached from the wall(either through a interaction or verb)
#define ATFA_DETACHABLE (1<<2)
/// This is embedded into the wall , removeable using surgical clamps or pliers, and not by normal means.
#define ATFA_EMBEDDED (1<<3)
/// The player must be next to the wall to interact with the attached
#define ATFA_CLOSE_INTERACTIVE (1<<4)
/// Player has to be near the turf the attached is facing to interact with it. Default behaviour
#define ATFA_EASY_INTERACTIVE (1<<5)
/// This can only be hit if the bullets come from the direction it is facing or if they are penetrating ,but otherwise not.
#define ATFA_DIRECTIONAL_HITTABLE_STRICT (1<<6)
/// The bullet can come from any axis that shares a direction bit-flag with ourselves
#define ATFA_DIRECTIONAL_HITTABLE (1<<7)
/// Will force any hit-checking to be relatively offset by our position compared to the supporting atom.
#define ATFA_CENTER_ON_SUPPORTER (1<<8)
2 changes: 1 addition & 1 deletion code/__DEFINES/error_handler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
#define ERROR_MAX_COOLDOWN (ERROR_COOLDOWN * ERROR_LIMIT)
#define ERROR_SILENCE_TIME 6000 // How long a unique error will be silenced for
// How long to wait between messaging admins about occurrences of a unique error
#define ERROR_MSG_DELAY 50
#define ERROR_MSG_DELAY 50
6 changes: 5 additions & 1 deletion code/__DEFINES/maths.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@

#define CEILING(x, y) ( -round(-(x) / (y)) * (y) )

#define DIST_EUCLIDIAN(x1,y1,x2,y2) (sqrt((x1-x2)**2 + (y1-y2)**2))
#define DIST_EUCLIDIAN_2D(x1,y1,x2,y2) (sqrt((x1-x2)**2 + (y1-y2)**2))

#define DIST_EUCLIDIAN_3D(x1,y1,z1,x2,y2,z2) (sqrt((x1-x2)**2 + (y1-y2)**2 + (z1-z2)**2))



// round() acts like floor(x, 1) by default but can't handle other values
#define FLOOR(x, y) ( round((x) / (y)) * (y) )
Expand Down
16 changes: 12 additions & 4 deletions code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@


// Special return values from bullet_act(). Positive return values are already used to indicate the blocked level of the projectile.
#define PROJECTILE_STOP 1 //if the projectile should stop flying after calling bullet_act()
#define PROJECTILE_CONTINUE -1 //if the projectile should continue flying after calling bullet_act()
#define PROJECTILE_FORCE_MISS -2 //if the projectile should treat the attack as a miss (suppresses attack and admin logs) - only applies to mobs.
#define PROJECTILE_FORCE_MISS_SILENCED -2.5 //if the projectile should do the same thing as above, but not give the miss message
#define PROJECTILE_STOP 1 //if the projectile should stop flying after calling bullet_act()
#define PROJECTILE_CONTINUE 2//if the projectile should continue flying after calling bullet_act()
#define PROJECTILE_FORCE_MISS 4 //if the projectile should treat the attack as a miss (suppresses attack and admin logs) - only applies to mobs.
#define PROJECTILE_FORCE_MISS_SILENCED 8//if the projectile should do the same thing as above, but not give the miss message

//Camera capture modes
#define CAPTURE_MODE_REGULAR 0 //Regular polaroid camera mode
Expand Down Expand Up @@ -228,6 +228,10 @@
#define EMAIL_BROADCAST "[email protected]"
#define EMAIL_PAYROLL "[email protected]"

#ifdef BULLETDEBUG
GLOBAL_LIST_EMPTY(initVis)
#endif

#define LEGACY_RECORD_STRUCTURE(X, Y) GLOBAL_LIST_EMPTY(##X);/datum/computer_file/data/##Y/var/list/fields[0];/datum/computer_file/data/##Y/New(){..();GLOB.##X.Add(src);}/datum/computer_file/data/##Y/Destroy(){. = ..();GLOB.##X.Remove(src);}

//Number of slots a modular computer has which can be tweaked via gear tweaks.
Expand Down Expand Up @@ -367,3 +371,7 @@
#define TTS_SEED_DEFAULT_FEMALE "Female_1"
#define TTS_SEED_DEFAULT_MALE "Male_1"
#define TTS_SEED_ANNOUNCER "Robot_2"

#define BBOX(x1,y1,x2,y2, minLevel, maxLevel, flags) list(x1,y1,x2,y2, minLevel, maxLevel, flags)
#define BLINE(x1,y1,x2,y2, minLevel, maxLevel, flags) list(x1,y1,x2,y2, minLevel, maxLevel, flags)
#define TRIGSLOPE(x1,y1,x2,y2) ((y2-y1)/(x2-x1))
4 changes: 0 additions & 4 deletions code/__DEFINES/projectile_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,3 @@
#define SLOT_UNDERBARREL "underbarrel"
#define SLOT_MECHANICS "mechanics"
#define SLOT_BAYONET "bayonet slot"

#define HEIGHT_LOW 1
#define HEIGHT_CENTER 0
#define HEIGHT_HIGH 2
1 change: 1 addition & 0 deletions code/__DEFINES/subsystems-priority.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var/list/bitflags = list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096
#define FIRE_PRIORITY_TIMER 700
#define SS_PRIORITY_TICKER 200 // Gameticker processing.
#define FIRE_PRIORITY_TGUI 110
#define SS_PRIORITY_BULLETS 102
#define FIRE_PRIORITY_EXPLOSIONS 105 // Explosions!
#define FIRE_PRIORITY_THROWING 106 // Throwing! after explosions since they influence throw direction
#define SS_PRIORITY_HUMAN 101 // Human Life().
Expand Down
3 changes: 2 additions & 1 deletion code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,13 @@
#define INIT_ORDER_XKEYSCORE -10
#define INIT_ORDER_STICKY_BAN -10
#define INIT_ORDER_TICKETS -10
#define INIT_ORDER_BULLETS -11
#define INIT_ORDER_LIGHTING -20
#define INIT_ORDER_JAMMING -22
#define INIT_ORDER_SQUEAK -40
#define INIT_ORDER_XENOARCH -50
#define INIT_ORDER_PERSISTENCE -100
#define INIT_OPEN_SPACE -150
#define INIT_ORDER_LIGHTING -160
#define INIT_ORDER_LATELOAD -180
#define INIT_ORDER_CHAT -185
#define INIT_ORDER_SHUTTLE -190
Expand Down
38 changes: 38 additions & 0 deletions code/__HELPERS/_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,44 @@
#define SANITIZE_LIST(L) ( islist(L) ? L : list() )
#define reverseList(L) reverseRange(L.Copy())

/// L - List, I - Item , K = Key . For associative lists
#define ASSLADD(L, I, K) \
if(!length(L))\
L = list();\
L[K] = I;\

/// L - List, K = Key . For associative lists
#define ASSLREMOVE(L, K)\
if(length(L)){\
L -= K;\
if(length(L) == 0){\
del(L);};\
};

/// L - List, I - Item , K = Key . For lists indexed by associative
#define ASSLLADD(L, I, K) \
if(length(L)){\
if(!length(L[K])){\
L[K] = list(I);}\
else{\
L[K] += I;};\
}\
else\
L = list();\
L[K] = list(I);\

/// L - List, I - Item , K = Key . For lists indexed by associtive
#define ASSLLREMOVE(L, I, K)\
if(length(L))\
if(length(L[K]) > 1)\
L[K] -= I;\
else\
L -= K;\
if(length(L) == 0)\
del(L);\



//Sets the value of a key in an assoc list
#define LAZYSET(L,K,V) if(!L) { L = list(); } L[K] = V;

Expand Down
Loading
Loading