Skip to content

Commit

Permalink
Merge branch 'dev' of https://gitlab.com/cmdevs/colonial-warfare into…
Browse files Browse the repository at this point in the history
… maploader

# Conflicts:
#	code/__HELPERS/unsorted.dm
#	code/controllers/subsystem/ticker.dm
#	code/controllers/voting.dm
#	code/game/gamemodes/cm_self_destruct.dm
#	code/game/gamemodes/colonialmarines/whiskey_outpost.dm
#	code/game/jobs/job/job.dm
#	code/game/jobs/role_authority.dm
#	code/game/world.dm
#	code/modules/mob/new_player/new_player.dm
  • Loading branch information
spookydonut authored and Watermelon914 committed Jan 4, 2021
1 parent e527811 commit 276cda2
Show file tree
Hide file tree
Showing 338 changed files with 4,760 additions and 5,941 deletions.
31 changes: 17 additions & 14 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
[*]
indent_style = tab
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf

[*.yml]
indent_style = space
indent_size = 2

[*.py]
indent_style = space
[*]
indent_style = tab
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf

[*.yml]
indent_style = space
indent_size = 2

[*.py]
indent_style = space

[*.json]
indent_style = space
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,14 @@ cfg/
tmp/
tools/Runtime Condenser/Input.txt
tools/Runtime Condenser/Output.txt
tools/MapDaemon/logs/*.txt
sound/music/*.ogg
sound/music/walkman/*/*.ogg
sound/music/walkman/*.txt
icons/custom/*
maps/**/backup
*.json
*.before
__pycache__
test_environment.txt

*.json
*.vscode/*
!/.vscode/extensions.json
61 changes: 32 additions & 29 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
image: i386/ubuntu:xenial

stages:
- build

variables:
BYOND_MAJOR: "513"
BYOND_MINOR: "1527"
SPACEMAN_DMM_VERSION: "1.6"
GITLAB_CHANGELOG_PID: "21031593"
GITLAB_REPO_LINK: "[email protected]:cmdevs/colonial-warfare.git"

stages:
- build

before_script:
- apt-get update -qq
- apt-get --yes install build-essential unzip libc6:i386 libgcc1:i386 libstdc++6:i386 curl -qq
- curl "http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip
- unzip byond.zip
- cd byond
- make install
- cd ..
- curl -LJO "https://github.com/SpaceManiac/SpacemanDMM/releases/download/suite-${SPACEMAN_DMM_VERSION}/dreamchecker" -o dreamchecker
- chmod +x dreamchecker

build:
stage: build
script:
- ./dreamchecker
- chmod +rwx ./insert_maps_in_dme.sh
- ./insert_maps_in_dme.sh
- DreamMaker ColonialMarinesALPHA.dme
artifacts:
paths:
- ColonialMarinesALPHA.dmb
- ColonialMarinesALPHA.rsc
expire_in: 20min
run_linters:
stage: build
before_script:
- apt update
- apt install -y software-properties-common
- add-apt-repository ppa:deadsnakes/ppa
- apt update
- apt install -y curl unzip build-essential libssl-dev build-essential libc6:i386 libgcc1:i386 libstdc++6:i386 python3.7 wget
- bash tools/ci/install_spaceman_dmm.sh dreamchecker
script:
- find . -name "*.json" -not -path "*/node_modules/*" -print0 | xargs -0 python3 ./tools/json_verifier.py
- ~/dreamchecker
compile_all_maps:
stage: build
before_script:
- apt update
- apt install -y software-properties-common
- add-apt-repository ppa:deadsnakes/ppa
- apt update
- apt install -y curl python3.7 unzip build-essential libc6:i386 libgcc1:i386 libstdc++6:i386
script:
- bash tools/ci/install_byond.sh
- source $HOME/BYOND/byond/bin/byondsetup
- python3 tools/ci/template_dm_generator.py
- bash tools/ci/dm.sh -DCIBUILDING -DCITESTING -DALL_MAPS ColonialMarinesALPHA.dme
artifacts:
paths:
- ColonialMarinesALPHA.dmb
- ColonialMarinesALPHA.rsc
expire_in: 20min

changelog:
stage: build
Expand Down
24 changes: 16 additions & 8 deletions ColonialMarinesALPHA.dme
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include "code\__DEFINES\icon_source_map.dm"
#include "code\__DEFINES\job.dm"
#include "code\__DEFINES\layers.dm"
#include "code\__DEFINES\maps.dm"
#include "code\__DEFINES\marine.dm"
#include "code\__DEFINES\math_physics.dm"
#include "code\__DEFINES\MC.dm"
Expand All @@ -66,6 +67,7 @@
#include "code\__DEFINES\subsystem.dm"
#include "code\__DEFINES\tests.dm"
#include "code\__DEFINES\tgui.dm"
#include "code\__DEFINES\turf_flags.dm"
#include "code\__DEFINES\urls.dm"
#include "code\__DEFINES\vehicle.dm"
#include "code\__DEFINES\vendors.dm"
Expand Down Expand Up @@ -137,7 +139,6 @@
#include "code\_onclick\hud\yautja.dm"
#include "code\controllers\_DynamicAreaLighting_TG.dm"
#include "code\controllers\shuttle_controller.dm"
#include "code\controllers\voting.dm"
#include "code\controllers\configuration\config_entry.dm"
#include "code\controllers\configuration\configuration.dm"
#include "code\controllers\configuration\entries\combat_config.dm"
Expand Down Expand Up @@ -173,6 +174,7 @@
#include "code\controllers\subsystem\item_cleanup.dm"
#include "code\controllers\subsystem\lighting.dm"
#include "code\controllers\subsystem\machinery.dm"
#include "code\controllers\subsystem\mapping.dm"
#include "code\controllers\subsystem\mapview.dm"
#include "code\controllers\subsystem\midi.dm"
#include "code\controllers\subsystem\mob.dm"
Expand Down Expand Up @@ -203,7 +205,6 @@
#include "code\controllers\subsystem\init\landmarks.dm"
#include "code\controllers\subsystem\init\law.dm"
#include "code\controllers\subsystem\init\lobby_art.dm"
#include "code\controllers\subsystem\init\mapview.dm"
#include "code\controllers\subsystem\processing\objects.dm"
#include "code\controllers\subsystem\processing\processing.dm"
#include "code\datums\_atmos_setup.dm"
Expand All @@ -221,6 +222,7 @@
#include "code\datums\event_info_text.dm"
#include "code\datums\fluff_emails.dm"
#include "code\datums\global_variables.dm"
#include "code\datums\map_config.dm"
#include "code\datums\matrix_editor.dm"
#include "code\datums\medal_awards.dm"
#include "code\datums\mind.dm"
Expand Down Expand Up @@ -430,6 +432,7 @@
#include "code\game\sound.dm"
#include "code\game\supplyshuttle.dm"
#include "code\game\world.dm"
#include "code\game\area\admin_level.dm"
#include "code\game\area\almayer.dm"
#include "code\game\area\areas.dm"
#include "code\game\area\BigRed.dm"
Expand All @@ -445,7 +448,6 @@
#include "code\game\area\strata.dm"
#include "code\game\area\Sulaco.dm"
#include "code\game\area\WhiskeyOutpost.dm"
#include "code\game\area\Z_Holder.dm"
#include "code\game\cas_manager\datums\cas_fire_envelope.dm"
#include "code\game\cas_manager\datums\cas_fire_mission.dm"
#include "code\game\cas_manager\datums\cas_iff_group.dm"
Expand Down Expand Up @@ -1047,6 +1049,7 @@
#include "code\modules\admin\IsBanned.dm"
#include "code\modules\admin\NewBan.dm"
#include "code\modules\admin\player_notes.dm"
#include "code\modules\admin\server_verbs.dm"
#include "code\modules\admin\stickyban.dm"
#include "code\modules\admin\STUI.dm"
#include "code\modules\admin\ToRban.dm"
Expand Down Expand Up @@ -1120,6 +1123,7 @@
#include "code\modules\clans\ship.dm"
#include "code\modules\client\client_defines.dm"
#include "code\modules\client\client_procs.dm"
#include "code\modules\client\player_details.dm"
#include "code\modules\client\preferences.dm"
#include "code\modules\client\preferences_factions.dm"
#include "code\modules\client\preferences_gear.dm"
Expand Down Expand Up @@ -1289,6 +1293,14 @@
#include "code\modules\law\laws\major_crime.dm"
#include "code\modules\law\laws\minor_crime.dm"
#include "code\modules\law\laws\optional.dm"
#include "code\modules\mapping\map_template.dm"
#include "code\modules\mapping\preloader.dm"
#include "code\modules\mapping\reader.dm"
#include "code\modules\mapping\verify.dm"
#include "code\modules\mapping\space_management\space_level.dm"
#include "code\modules\mapping\space_management\space_reservation.dm"
#include "code\modules\mapping\space_management\traits.dm"
#include "code\modules\mapping\space_management\zlevel_manager.dm"
#include "code\modules\maps\dmm_suite.dm"
#include "code\modules\maps\reader.dm"
#include "code\modules\mapview\generation.dm"
Expand Down Expand Up @@ -1815,9 +1827,5 @@
#include "code\modules\vehicles\tank\tank.dm"
#include "interface\interface.dm"
#include "interface\skin.dmf"
#include "maps\Z.02.Admin_Level.dm"
#include "maps\Z.01.LV624.dmm"
#include "maps\Z.02.Admin_Level.dmm"
#include "maps\Z.03.USS_Almayer.dmm"
#include "maps\Z.04.Low_Orbit.dmm"
#include "maps\_basemap.dm"
// END_INCLUDE
5 changes: 1 addition & 4 deletions code/__DEFINES/__game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

#define PLAYERCOUNT_LOWPOP_MAP_LIMIT 130 // number of players before we switch to lowpop maps only (LV, BR, Prison)

#define PREROUND_TIME 240 // time before the round starts
#define PREROUND_TIME 360 // time before the round starts

//A set of constants used to determine which type of mute an admin wishes to apply:
//Please read and understand the muting/automuting stuff before changing these. MUTE_IC_AUTO etc = (MUTE_IC << 1)
Expand Down Expand Up @@ -179,9 +179,6 @@
//=================================================
//Game mode related defines.

var/list/accessable_z_levels = list("1" = 10, "3" = 10, "4" = 10, "5" = 70)
//This list contains the z-level numbers which can be accessed via space travel and the percentile chances to get there.

#define TRANSITIONEDGE 3 //Distance from edge to move to another z-level

//Flags for zone sleeping
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// These are signals which can be listened to by any component on any parent
// start global signals with "!", this used to be necessary but now it's just a formatting choice

///from base of datum/controller/subsystem/mapping/proc/add_new_zlevel(): (list/args)
#define COMSIG_GLOB_NEW_Z "!new_z"
///from base of datum/controller/subsystem/mapping/proc/add_new_zlevel(): (list/args)
#define COMSIG_GLOB_VEHICLE_ORDERED "!vehicle_ordered"
///from /datum/game_mode/proc/pre_setup
Expand All @@ -16,6 +18,7 @@
#define COMSIG_GLOB_MARINE_DEATH "!marine_death"
///from /mob/living/carbon/Xenomorph/death
#define COMSIG_GLOB_XENO_DEATH "!xeno_death"
#define COMSIG_GLOB_REMOVE_VOTE_BUTTON "!remove_vote_button"

//////////////////////////////////////////////////////////////////

Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define CAN_BE_SYRINGED (1<<13) // syringes can inject or drain reagents in this even if it isn't an OPENCONTAINER
#define CAN_BE_DISPENSED_INTO (1<<14) // Chem dispenser can dispense in this even if it isn't an OPENCONTAINER
#define INITIALIZED (1<<15) // Initialized by SSatoms.
#define ATOM_DECORATED (1<<16) // Has run Decorate() as part of subsystem init
//==========================================================================================

#define HANDLE_BARRIER_CHANCE 1
Expand Down
6 changes: 3 additions & 3 deletions code/__DEFINES/icon_source_map.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GLOBAL_LIST_EMPTY(icon_source_files)

/proc/get_icon_from_source(source_name)
var/icon/I = null
if(GLOB.icon_source_files[source_name])
return GLOB.icon_source_files[source_name]
GLOB.icon_source_files[source_name] = file(source_name)
I = GLOB.icon_source_files[source_name]
return I
return GLOB.icon_source_files[source_name]
116 changes: 116 additions & 0 deletions code/__DEFINES/maps.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
/*
The /tg/ codebase allows mixing of hardcoded and dynamically-loaded z-levels.
Z-levels can be reordered as desired and their properties are set by "traits".
See map_config.dm for how a particular station's traits may be chosen.
The list DEFAULT_MAP_TRAITS at the bottom of this file should correspond to
the maps that are hardcoded, as set in maps/_basemap.dm. SSmapping is
responsible for loading every non-hardcoded z-level.
Multi-Z stations are supported and multi-Z mining and away missions would
require only minor tweaks.
*/

// helpers for modifying jobs, used in various job_changes.dm files
#define MAP_JOB_CHECK if(SSmapping.configs[GROUND_MAP].map_name != JOB_MODIFICATION_MAP_NAME) { return; }
#define MAP_JOB_CHECK_BASE if(SSmapping.configs[GROUND_MAP].map_name != JOB_MODIFICATION_MAP_NAME) { return ..(); }
#define MAP_REMOVE_JOB(jobpath) /datum/job/##jobpath/map_check() { return (SSmapping.configs[GROUND_MAP].map_name != JOB_MODIFICATION_MAP_NAME) && ..() }

#define SPACERUIN_MAP_EDGE_PAD 15

// traits
// boolean - marks a level as having that property if present
#define ZTRAIT_STATION "Station"
#define ZTRAIT_RESERVED "Transit/Reserved"
#define ZTRAIT_GROUND "Ground"
#define ZTRAIT_MARINE_MAIN_SHIP "Marine Main Ship"
#define ZTRAIT_ADMIN "Admin"
#define ZTRAIT_LOWORBIT "LowOrbit"
#define ZTRAIT_HUNTER_SHIP "HunterShop"
#define ZTRAIT_INTERIORS "Interiors"

#define ZTRAIT_FOG "Fog"
#define ZTRAIT_LOCKDOWN "Lockdown"

// boolean - weather types that occur on the level
#define ZTRAIT_SNOWSTORM "weather_snowstorm"
#define ZTRAIT_ASHSTORM "weather_ashstorm"
#define ZTRAIT_ACIDRAIN "weather_acidrain"
#define ZTRAIT_SANDSTORM "weather_sandstorm"

// number - bombcap is multiplied by this before being applied to bombs
#define ZTRAIT_BOMBCAP_MULTIPLIER "Bombcap Multiplier"

// number - default gravity if there's no gravity generators or area overrides present
#define ZTRAIT_GRAVITY "Gravity"

// numeric offsets - e.g. {"Down": -1} means that chasms will fall to z - 1 rather than oblivion
#define ZTRAIT_UP "Up"
#define ZTRAIT_DOWN "Down"

// enum - how space transitions should affect this level
#define ZTRAIT_LINKAGE "Linkage"
// UNAFFECTED if absent - no space transitions
#define UNAFFECTED null
// SELFLOOPING - space transitions always self-loop
#define SELFLOOPING "Self"
// CROSSLINKED - mixed in with the cross-linked space pool
#define CROSSLINKED "Cross"

// string - type path of the z-level's baseturf (defaults to space)
#define ZTRAIT_BASETURF "Baseturf"

// default trait definitions, used by SSmapping
#define ZTRAITS_MAIN_SHIP list(ZTRAIT_MARINE_MAIN_SHIP = TRUE)
#define ZTRAITS_GROUND list(ZTRAIT_GROUND = TRUE)
#define ZTRAITS_ADMIN list(ZTRAIT_ADMIN = TRUE)
#define ZTRAITS_LOWORBIT list(ZTRAIT_LOWORBIT = TRUE)
#define ZTRAITS_SPACE list(ZTRAIT_LINKAGE = CROSSLINKED, ZTRAIT_SPACE_RUINS = TRUE)
#define ZTRAITS_INTERIORS list(ZTRAIT_INTERIORS = TRUE)

#define DL_NAME "name"
#define DL_TRAITS "traits"
#define DECLARE_LEVEL(NAME, TRAITS) list(DL_NAME = NAME, DL_TRAITS = TRAITS)

// must correspond to _basemap.dm for things to work correctly
#define DEFAULT_MAP_TRAITS list(\
DECLARE_LEVEL("CentCom", ZTRAITS_ADMIN),\
DECLARE_LEVEL("LowOrbit", ZTRAITS_LOWORBIT),\
)

// Camera lock flags
#define CAMERA_LOCK_SHIP (1<<0)
#define CAMERA_LOCK_GROUND (1<<1)
#define CAMERA_LOCK_ADMIN (1<<2)

//Reserved/Transit turf type
#define RESERVED_TURF_TYPE /turf/open/space/basic //What the turf is when not being used

//Ruin Generation

#define PLACEMENT_TRIES 100 //How many times we try to fit the ruin somewhere until giving up (really should just swap to some packing algo)

#define PLACE_DEFAULT "random"
#define PLACE_SAME_Z "same"
#define PLACE_SPACE_RUIN "space"
#define PLACE_LAVA_RUIN "lavaland"


#define GROUND_MAP "ground_map"
#define SHIP_MAP "ship_map"
#define ALL_MAPTYPES list(GROUND_MAP, SHIP_MAP)
#define MAP_TO_FILENAME list(GROUND_MAP = "data/next_map.json", SHIP_MAP = "data/next_ship.json")

// traity things
#define MAP_COLD "COLD"

#define MAP_ARMOR_STYLE_DEFAULT "default"
#define MAP_ARMOR_STYLE_ICE "ice"
#define MAP_ARMOR_STYLE_JUNGLE "jungle"
#define MAP_ARMOR_STYLE_PRISON "prison"

//turf-only flags
#define NOJAUNT_1 (1<<0)
#define UNUSED_RESERVATION_TURF_1 (1<<1)
/// If a turf can be made dirty at roundstart. This is also used in areas.
#define CAN_BE_DIRTY_1 (1<<2)
Loading

0 comments on commit 276cda2

Please sign in to comment.