Skip to content

Commit

Permalink
Merge pull request #93 from Starfly-13/revert-shiptest-3527
Browse files Browse the repository at this point in the history
Revert "Kill Xenobio Stuff (#3527)"
  • Loading branch information
lectronyx authored Jan 27, 2025
2 parents a0ed1f5 + 3720336 commit 8efaba4
Show file tree
Hide file tree
Showing 137 changed files with 8,261 additions and 49 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/run_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run: |
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install -o APT::Immediate-Configure=false libssl-dev:i386
sudo apt install -o APT::Immediate-Configure=false libssl-dev:i386 zlib1g:i386 zlib1g-dev:i386
- name: Setup dependencies cache
id: cache-deps
Expand All @@ -57,16 +57,21 @@ jobs:
- name: Install build dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
sudo apt install -o APT::Immediate-Configure=false libgcc-s1:i386 g++-multilib zlib1g-dev:i386
sudo apt install -o APT::Immediate-Configure=false libgcc-s1:i386 g++-multilib zlib1g-dev:i386 gcc-multilib libc6-i386 pkg-config:i386
rustup target add i686-unknown-linux-gnu
- name: Build auxmos
if: steps.cache-deps.outputs.cache-hit != 'true'
run: bash tools/ci/build_auxmos.sh

- name: Build rust-g
if: steps.cache-deps.outputs.cache-hit != 'true'
run: bash tools/ci/build_rust_g.sh
- name: Copy rust-g (if needed)
run: |
if [ ! -f $HOME/BYOND/byond/bin/librust_g.so ]; then
unxz tools/starfly/rust_g/librust_g.so.xz
mv -v tools/starfly/rust_g/librust_g.so ~/.byond/bin/librust_g.so
chmod +x ~/.byond/bin/librust_g.so
ldd ~/.byond/bin/librust_g.so
fi
- name: Setup database
run: |
Expand Down
32 changes: 32 additions & 0 deletions Dockerfile-rust_g
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# syntax=docker/dockerfile:1
FROM beestation/byond:515.1633 as base

# Install the tools needed to compile our rust dependencies
FROM base as rust-build
ENV PKG_CONFIG_ALLOW_CROSS=1 \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
WORKDIR /build
COPY dependencies.sh .
RUN dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
curl ca-certificates gcc-multilib \
clang g++-multilib libc6-i386 \
zlib1g-dev:i386 pkg-config:i386 git \
&& /bin/bash -c "source dependencies.sh \
&& curl https://sh.rustup.rs | sh -s -- -y -t i686-unknown-linux-gnu --no-modify-path --profile minimal --default-toolchain \$RUST_VERSION" \
&& rm -rf /var/lib/apt/lists/*

# Build rust-g
FROM rust-build as build-rustg
RUN git init \
&& git remote add origin https://github.com/tgstation/rust-g \
&& /bin/bash -c "source dependencies.sh \
&& git fetch --depth 1 origin \$RUST_G_VERSION" \
&& git checkout FETCH_HEAD \
&& cargo build --release --target i686-unknown-linux-gnu

# Create the final container image with rust-g
FROM scratch as rustg
COPY --from=build-rustg /build/target/i686-unknown-linux-gnu/release/librust_g.so /librust_g.so
12 changes: 8 additions & 4 deletions _maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1028,10 +1028,14 @@
pixel_y = 32
},
/obj/structure/closet/secure_closet/freezer/wall/directional/west,
/obj/effect/spawner/random/food_or_drink/ration,
/obj/effect/spawner/random/food_or_drink/ration,
/obj/effect/spawner/random/food_or_drink/ration,
/obj/effect/spawner/random/food_or_drink/ration,
/obj/item/reagent_containers/food/snacks/rationpack,
/obj/item/reagent_containers/food/snacks/rationpack,
/obj/item/reagent_containers/food/snacks/rationpack,
/obj/item/reagent_containers/food/snacks/rationpack,
/obj/item/reagent_containers/food/snacks/rationpack,
/obj/item/reagent_containers/food/snacks/rationpack,
/obj/item/reagent_containers/food/snacks/rationpack,
/obj/item/reagent_containers/food/snacks/rationpack,
/obj/item/reagent_containers/condiment/enzyme{
pixel_x = -8;
pixel_y = 5
Expand Down
14 changes: 14 additions & 0 deletions _maps/RandomRuins/RockRuins/rockplanet_budgetcuts.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,21 @@
/area/overmap_encounter/planetoid/rockplanet/explored)
"pj" = (
/obj/structure/table/reinforced,
/obj/item/slime_extract/grey{
pixel_x = -4;
pixel_y = -1
},
/obj/item/slime_extract/grey{
pixel_x = 8
},
/obj/item/slime_extract/grey,
/obj/item/slime_extract/grey,
/obj/item/slime_extract/green{
pixel_x = 4;
pixel_y = -6
},
/obj/structure/window/reinforced,
/obj/item/slime_scanner,
/turf/open/floor/engine,
/area/ruin/rockplanet/nanotrasen)
"pl" = (
Expand Down
4 changes: 2 additions & 2 deletions _maps/RandomRuins/SpaceRuins/power_puzzle.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1850,8 +1850,8 @@
/obj/item/reagent_containers/food/drinks/waterbottle/empty,
/obj/item/reagent_containers/food/drinks/waterbottle/empty,
/obj/item/reagent_containers/food/drinks/waterbottle,
/obj/effect/spawner/random/food_or_drink/ration,
/obj/effect/spawner/random/food_or_drink/ration,
/obj/item/reagent_containers/food/snacks/rationpack,
/obj/item/reagent_containers/food/snacks/rationpack,
/obj/item/reagent_containers/food/snacks/sosjerky,
/obj/item/reagent_containers/food/snacks/sosjerky,
/obj/item/stack/medical/gauze/improvised,
Expand Down
3 changes: 3 additions & 0 deletions _maps/shuttles/nanotrasen/nanotrasen_delta.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1883,6 +1883,9 @@
/obj/structure/rack,
/obj/item/weldingtool/hugetank/empty,
/obj/item/clothing/mask/gas/welding,
/obj/item/slimepotion/slime/sentience/mining,
/obj/item/slimepotion/slime/sentience/mining,
/obj/item/slimepotion/slime/sentience/mining,
/obj/machinery/light/small/directional/east,
/obj/machinery/button/door{
dir = 4;
Expand Down
16 changes: 16 additions & 0 deletions bin/build-rust-g
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
# build-rust-g

# determine the version of rust_g
source dependencies.sh
echo "Building rust_g v${RUST_G_VERSION}..."

# build rust_g, and tag it as rust_g:$RUST_G_VERSION
docker buildx build \
--file Dockerfile-rust_g \
--no-cache \
--tag rust_g:${RUST_G_VERSION} \
.

# since we just built rust_g, tag it again as rust_g:latest
docker image tag rust_g:${RUST_G_VERSION} rust_g:latest
6 changes: 3 additions & 3 deletions check_regex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ standards:

- exactly: [1, "/atom text paths", '"/atom']
- exactly: [1, "/area text paths", '"/area']
- exactly: [16, "/datum text paths", '"/datum']
- exactly: [17, "/datum text paths", '"/datum']
- exactly: [4, "/mob text paths", '"/mob']
- exactly: [33, "/obj text paths", '"/obj']
- exactly: [34, "/obj text paths", '"/obj']
- exactly: [0, "/turf text paths", '"/turf']
- exactly: [113, "text2path uses", "text2path"]
- exactly: [114, "text2path uses", "text2path"]

- exactly: [18, "world<< uses", 'world[ \t]*<<']
- exactly: [0, "world.log<< uses", 'world.log[ \t]*<<']
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/atmospherics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
/// the default air mix that open turfs spawn
#define OPENTURF_DEFAULT_ATMOS "o2=22;n2=82;TEMP=293.15"
#define OPENTURF_LOW_PRESSURE "o2=14;n2=30;TEMP=293.15"
/// -193,15°C telecommunications. good fluff for comms areas
/// -193,15°C telecommunications. also used for xenobiology slime killrooms
#define TCOMMS_ATMOS "n2=100;TEMP=80"
/// space
#define AIRLESS_ATMOS "TEMP=2.7"
Expand Down
8 changes: 8 additions & 0 deletions code/__DEFINES/dcs/signals/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,14 @@
#define COMSIG_ACTION_TRIGGER "action_trigger" //from base of datum/action/proc/Trigger(): (datum/action)
#define COMPONENT_ACTION_BLOCK_TRIGGER 1

//Xenobio hotkeys
#define COMSIG_XENO_SLIME_CLICK_CTRL "xeno_slime_click_ctrl" //from slime CtrlClickOn(): (/mob)
#define COMSIG_XENO_SLIME_CLICK_ALT "xeno_slime_click_alt" //from slime AltClickOn(): (/mob)
#define COMSIG_XENO_SLIME_CLICK_SHIFT "xeno_slime_click_shift" //from slime ShiftClickOn(): (/mob)
#define COMSIG_XENO_TURF_CLICK_SHIFT "xeno_turf_click_shift" //from turf ShiftClickOn(): (/mob)
#define COMSIG_XENO_TURF_CLICK_CTRL "xeno_turf_click_alt" //from turf AltClickOn(): (/mob)
#define COMSIG_XENO_MONKEY_CLICK_CTRL "xeno_monkey_click_ctrl" //from monkey CtrlClickOn(): (/mob)

// /datum/overmap signals
/// From overmap Move(): (old_x, old_y)
#define COMSIG_OVERMAP_MOVED "overmap_moved"
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
#define HIDDEN_AREA (1<<6)
/// If false, loading multiple maps with this area type will create multiple instances.
#define UNIQUE_AREA (1<<7)
/// Can the Xenobio management console transverse this area by default?
#define XENOBIOLOGY_COMPATIBLE (1<<8)

/*
These defines are used specifically with the atom/pass_flags bitmask
Expand Down
9 changes: 9 additions & 0 deletions code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,15 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
#define SYRINGE_DRAW 0
#define SYRINGE_INJECT 1

//gold slime core spawning
#define NO_SPAWN 0
#define HOSTILE_SPAWN 1
#define FRIENDLY_SPAWN 2

//slime core activation type
#define SLIME_ACTIVATE_MINOR 1
#define SLIME_ACTIVATE_MAJOR 2

#define LUMINESCENT_DEFAULT_GLOW 2

#define RIDING_OFFSET_ALL "ALL"
Expand Down
4 changes: 3 additions & 1 deletion code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,10 @@
#define RACE_SWAP (1<<3)
//ERT spawn template (avoid races that don't function without correct gear)
#define ERT_SPAWN (1<<4)
//xenobio black crossbreed
#define SLIME_EXTRACT (1<<5)
//Wabbacjack staff projectiles
#define WABBAJACK (1<<5)
#define WABBAJACK (1<<6)

#define SLEEP_CHECK_DEATH(X) sleep(X); if(QDELETED(src) || stat == DEAD) return;

Expand Down
7 changes: 7 additions & 0 deletions code/__HELPERS/icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,13 @@ GLOBAL_LIST_EMPTY(friendly_animal_types)

// Pick a random animal instead of the icon, and use that instead
/proc/getRandomAnimalImage(atom/A)
if(!GLOB.friendly_animal_types.len)
for(var/T in typesof(/mob/living/simple_animal))
var/mob/living/simple_animal/SA = T
if(initial(SA.gold_core_spawnable) == FRIENDLY_SPAWN)
GLOB.friendly_animal_types += SA


var/mob/living/simple_animal/SA = pick(GLOB.friendly_animal_types)

var/icon = initial(SA.icon)
Expand Down
22 changes: 22 additions & 0 deletions code/__HELPERS/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,28 @@ GLOBAL_LIST_EMPTY(species_list)
else
to_chat(M, message)

//Used in chemical_mob_spawn. Generates a random mob based on a given gold_core_spawnable value.
/proc/create_random_mob(spawn_location, mob_class = HOSTILE_SPAWN)
var/static/list/mob_spawn_meancritters = list() // list of possible hostile mobs
var/static/list/mob_spawn_nicecritters = list() // and possible friendly mobs

if(mob_spawn_meancritters.len <= 0 || mob_spawn_nicecritters.len <= 0)
for(var/T in typesof(/mob/living/simple_animal))
var/mob/living/simple_animal/SA = T
switch(initial(SA.gold_core_spawnable))
if(HOSTILE_SPAWN)
mob_spawn_meancritters += T
if(FRIENDLY_SPAWN)
mob_spawn_nicecritters += T

var/chosen
if(mob_class == FRIENDLY_SPAWN)
chosen = pick(mob_spawn_nicecritters)
else
chosen = pick(mob_spawn_meancritters)
var/mob/living/simple_animal/C = new chosen(spawn_location)
return C

/proc/passtable_on(target, source)
var/mob/living/L = target
if (!HAS_TRAIT(L, TRAIT_PASSTABLE) && L.pass_flags & PASSTABLE)
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/bitfields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ DEFINE_BITFIELD(area_flags, list(
"NOTELEPORT" = NOTELEPORT,
"HIDDEN_AREA" = HIDDEN_AREA,
"UNIQUE_AREA" = UNIQUE_AREA,
"XENOBIOLOGY_COMPATIBLE" = XENOBIOLOGY_COMPATIBLE,
))

DEFINE_BITFIELD(car_traits, list(
Expand Down
7 changes: 4 additions & 3 deletions code/_globalvars/lists/flavor_misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,9 @@ GLOBAL_LIST_INIT(scarySounds, list('sound/weapons/thudswoosh.ogg','sound/weapons
25 Toxins
26 Dormitories
27 Virology
28 Law Office
29 Detective's Office
28 Xenobiology
29 Law Office
30 Detective's Office
*/

//The whole system for the sorttype var is determined based on the order of this list,
Expand All @@ -264,7 +265,7 @@ GLOBAL_LIST_INIT(TAGGERLOCATIONS, list("Disposals",
"Robotics", "Head of Personnel's Office", "Library", "Chapel", "Theatre",
"Bar", "Kitchen", "Hydroponics", "Janitor Closet","Genetics",
"Experimentor Lab", "Toxins", "Dormitories", "Virology",
, "Law Office","Detective's Office"))
"Xenobiology", "Law Office","Detective's Office"))

GLOBAL_LIST_INIT(station_prefixes, world.file2list("strings/station_prefixes.txt"))

Expand Down
Loading

0 comments on commit 8efaba4

Please sign in to comment.