-
Notifications
You must be signed in to change notification settings - Fork 565
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'cmss13-devs:master' into NameSanityTheSequel
- Loading branch information
Showing
323 changed files
with
5,068 additions
and
1,254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#define GAMEMODE_DECORATOR(type, mode, list_edits) \ | ||
/datum/decorator/gamemode##type##mode { \ | ||
gamemode = mode; \ | ||
apply_type = type; \ | ||
edits = list_edits; \ | ||
} | ||
|
||
#define VARIABLE_EDIT(type, variable, value) nameof(type::variable) = value | ||
#define ARMOR_EDIT(variable, value) VARIABLE_EDIT(/obj/item/clothing/suit/storage/marine, variable, value) | ||
#define GUN_EDIT(variable, value) VARIABLE_EDIT(/obj/item/weapon/gun, variable, value) | ||
#define AMMO_EDIT(variable, value) VARIABLE_EDIT(/obj/item/ammo_magazine, variable, value) | ||
|
||
/** | ||
* Gamemode decorators allow us to make changes to edits on specific gamemodes, | ||
* to assist in balancing varied gameplay in different modes | ||
* | ||
* They can be manually defined, and procs overridden. Alternatively, | ||
* using the GAMEMODE_DECORATOR define, you can quickly make a decorator for | ||
* a specific type and subtypes. | ||
* | ||
* eg: | ||
* ``` | ||
* GAMEMODE_DECORATOR(/obj/item/clothing/suit/storage/marine/smartgunner, /datum/game_mode/extended/faction_clash, list( | ||
* ARMOR_EDIT(armor_bullet, CLOTHING_ARMOR_HIGH), | ||
* ARMOR_EDIT(armor_internaldamage, CLOTHING_ARMOR_HIGH) | ||
* )) | ||
* ``` | ||
* | ||
* If you need to edit different types, make a new define using VARIABLE_EDIT, and provide the parent path for the type. | ||
*/ | ||
/datum/decorator/gamemode | ||
/// The gamemode type this should apply to | ||
var/gamemode | ||
|
||
/// Which type this should apply edits to | ||
var/apply_type | ||
|
||
/// The list of edits to make | ||
var/list/edits | ||
|
||
/datum/decorator/gamemode/get_decor_types() | ||
return typesof(apply_type) | ||
|
||
/datum/decorator/gamemode/decorate(atom/object) | ||
for(var/edit in edits) | ||
object.vars[edit] = edits[edit] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.