Skip to content

Commit

Permalink
some fun around
Browse files Browse the repository at this point in the history
  • Loading branch information
blackcrystall committed Jun 28, 2024
1 parent 31e1ffb commit 116d985
Show file tree
Hide file tree
Showing 5 changed files with 437 additions and 412 deletions.
22 changes: 22 additions & 0 deletions code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,25 @@

// magic value to use for indicating a proc slept
#define PROC_RETURN_SLEEP -1

//Defines for echo list index positions.
//ECHO_DIRECT and ECHO_ROOM are the only two that actually appear to do anything, and represent the dry and wet channels of the environment effects, respectively.
//The rest of the defines are there primarily for the sake of completeness. It might be worth testing on EAX-enabled hardware, and on future BYOND versions (I've tested with 511, 512, and 513)
#define ECHO_DIRECT 1
#define ECHO_DIRECTHF 2
#define ECHO_ROOM 3
#define ECHO_ROOMHF 4
#define ECHO_OBSTRUCTION 5
#define ECHO_OBSTRUCTIONLFRATIO 6
#define ECHO_OCCLUSION 7
#define ECHO_OCCLUSIONLFRATIO 8
#define ECHO_OCCLUSIONROOMRATIO 9
#define ECHO_OCCLUSIONDIRECTRATIO 10
#define ECHO_EXCLUSION 11
#define ECHO_EXCLUSIONLFRATIO 12
#define ECHO_OUTSIDEVOLUMEHF 13
#define ECHO_DOPPLERFACTOR 14
#define ECHO_ROLLOFFFACTOR 15
#define ECHO_ROOMROLLOFFFACTOR 16
#define ECHO_AIRABSORPTIONFACTOR 17
#define ECHO_FLAGS 18
19 changes: 19 additions & 0 deletions code/_globalvars/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ GLOBAL_LIST_INIT_TYPED(chemical_gen_classes_list, /list, list("C" = list(),"C1"
//properties generated in chemicals, helps to make sure the same property doesn't show up 10 times
GLOBAL_LIST_INIT_TYPED(generated_properties, /list, list("positive" = list(), "negative" = list(), "neutral" = list()))

GLOBAL_LIST_INIT_TYPED(space_weapons, /datum/space_weapon, setup_ship_weapon())
GLOBAL_LIST_INIT_TYPED(space_weapons_ammo, /datum/space_weapon_ammo, setup_ship_ammo())

GLOBAL_LIST_INIT_TYPED(ammo_list, /datum/ammo, setup_ammo()) //List of all ammo types. Used by guns to tell the projectile how to act.
GLOBAL_REFERENCE_LIST_INDEXED(joblist, /datum/job, title) //List of all jobstypes, minus borg and AI

Expand Down Expand Up @@ -320,6 +323,22 @@ GLOBAL_LIST_INIT(hj_emotes, setup_hazard_joe_emotes())
all_species[S.name] = S
return all_species

/proc/setup_ship_weapon()
var/list/blacklist = list()
var/list/ammo_list = list()
for(var/T in subtypesof(/datum/space_weapon) - blacklist)
var/datum/space_weapon/A = new T
ammo_list[A.type] = A
return ammo_list

/proc/setup_ship_ammo()
var/list/blacklist = list()
var/list/ammo_list = list()
for(var/T in subtypesof(/datum/space_weapon_ammo) - blacklist)
var/datum/space_weapon_ammo/A = new T
ammo_list[A.type] = A
return ammo_list

/proc/setup_ammo()
var/list/blacklist = list(/datum/ammo/energy, /datum/ammo/energy/yautja, /datum/ammo/energy/yautja/rifle, /datum/ammo/bullet/shotgun, /datum/ammo/xeno)
var/list/ammo_list = list()
Expand Down
Loading

0 comments on commit 116d985

Please sign in to comment.