Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

Commit

Permalink
install_core: Support R2API v3
Browse files Browse the repository at this point in the history
  • Loading branch information
Foldex committed Apr 3, 2021
1 parent 65f651a commit 02805c4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion r2mod
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,19 @@ function install_core {

if [[ "$1" == "tristanmcpherson-R2API" ]]; then
cecho b "Copying R2API Files..." 1
cp -r -f "$3/monomod" "$BEPIN_DIR" || fatal_error "Failed to install R2API monomod folder"

if [[ -d "$3/patchers" ]]; then
# R2API v3
cp -r -f "$3/patchers" "$BEPIN_DIR" || fatal_error "Failed to install R2API patchers folder"
# remove v2 monomod
[[ -f "$BEPIN_DIR/monomod/Assembly-CSharp.R2API.mm.dll" ]] && rm "$BEPIN_DIR/monomod/Assembly-CSharp.R2API.mm.dll"
elif [[ -d "$3/monomod" ]]; then
# R2API v2 : TODO Should remove when mods update to R2API v3
cp -r -f "$3/monomod" "$BEPIN_DIR" || fatal_error "Failed to install R2API monomod folder"
# remove v3 patcher
[[ -f "$BEPIN_DIR/patchers/R2API.Patcher.dll" ]] && rm "$BEPIN_DIR/patchers/R2API.Patcher.dll"
fi

cp -r -f "$3/plugins" "$BEPIN_DIR" || fatal_error "Failed to install R2API plugins folder"
fi

Expand Down

0 comments on commit 02805c4

Please sign in to comment.