- add: Add advanced implanter. (#171)

* - add: Add advanced implanter.

* - tweak: All implants are single use now.
This commit is contained in:
Aviu00
2024-03-06 03:42:07 +09:00
committed by GitHub
parent b256c6aff2
commit fef46680fb
6 changed files with 39 additions and 1 deletions

View File

@@ -117,6 +117,9 @@ public abstract class SharedImplanterSystem : EntitySystem
_container.Insert(implant.Value, implantContainer);
RaiseLocalEvent(implant.Value, new SubdermalImplantInserted(user, target, implantComp)); //WD EDIT
if (component.CurrentMode == ImplanterToggleMode.Inject && component.SingleUse) // WD EDIT
component.ImplantOnly = true;
if (component.CurrentMode == ImplanterToggleMode.Inject && !component.ImplantOnly)
DrawMode(implanter, component);
else
@@ -205,7 +208,8 @@ public abstract class SharedImplanterSystem : EntitySystem
break;
}
if (component.CurrentMode == ImplanterToggleMode.Draw && !component.ImplantOnly && !permanentFound)
if (component.CurrentMode == ImplanterToggleMode.Draw && !component.ImplantOnly && !permanentFound &&
implanterContainer.Count > 0) // WD EDIT
ImplantMode(implanter, component);
Dirty(implanter, component);