Фиксы (#518)
* fix rcd ammo predicting * fix tts preview * cleanups HumanoidProfileEditor * fix double chaplain bible * loadout fixes * fix handlabeler mispredicting * fix resources couldnt be extracted due to the whitelist * wd edit * add security filled leather satchel to loadouts
This commit is contained in:
@@ -133,7 +133,13 @@ public abstract class SharedMaterialStorageSystem : EntitySystem
|
||||
/// <param name="volume"></param>
|
||||
/// <param name="component"></param>
|
||||
/// <returns>If the amount can be changed</returns>
|
||||
public bool CanChangeMaterialAmount(EntityUid uid, string materialId, int volume, MaterialStorageComponent? component, EntityUid? gridUid = null, MaterialStorageComponent? gridStorage = null)
|
||||
public bool CanChangeMaterialAmount(EntityUid uid,
|
||||
string materialId,
|
||||
int volume,
|
||||
MaterialStorageComponent? component,
|
||||
EntityUid? gridUid = null,
|
||||
MaterialStorageComponent? gridStorage = null,
|
||||
bool checkWhitelist = true)
|
||||
{
|
||||
if (!Resolve(uid, ref component))
|
||||
return false;
|
||||
@@ -141,7 +147,8 @@ public abstract class SharedMaterialStorageSystem : EntitySystem
|
||||
if (!CanTakeVolume(uid, volume, component, gridUid:gridUid, gridStorage:gridStorage))
|
||||
return false;
|
||||
|
||||
if (component.MaterialWhiteList != null && !component.MaterialWhiteList.Contains(materialId))
|
||||
// WD edit - added checkWhitelist bool
|
||||
if (checkWhitelist && component.MaterialWhiteList != null && !component.MaterialWhiteList.Contains(materialId))
|
||||
return false;
|
||||
|
||||
var amount = gridStorage != null
|
||||
@@ -181,12 +188,20 @@ public abstract class SharedMaterialStorageSystem : EntitySystem
|
||||
/// <param name="component"></param>
|
||||
/// <param name="dirty"></param>
|
||||
/// <returns>If it was successful</returns>
|
||||
public bool TryChangeMaterialAmount(EntityUid uid, string materialId, int volume, MaterialStorageComponent? component = null, bool dirty = true, EntityUid? gridUid = null, MaterialStorageComponent? gridStorage = null)
|
||||
public bool TryChangeMaterialAmount(EntityUid uid,
|
||||
string materialId,
|
||||
int volume,
|
||||
MaterialStorageComponent? component = null,
|
||||
bool dirty = true,
|
||||
EntityUid? gridUid = null,
|
||||
MaterialStorageComponent? gridStorage = null,
|
||||
bool checkWhitelist = true)
|
||||
{
|
||||
if (!Resolve(uid, ref component))
|
||||
return false;
|
||||
|
||||
if (!CanChangeMaterialAmount(uid, materialId, volume, component, gridUid:gridUid, gridStorage:gridStorage))
|
||||
// WD edit - added checkWhitelist bool
|
||||
if (!CanChangeMaterialAmount(uid, materialId, volume, component, gridUid:gridUid, gridStorage:gridStorage, checkWhitelist: checkWhitelist))
|
||||
return false;
|
||||
|
||||
var rightStorage = gridStorage ?? component;
|
||||
|
||||
Reference in New Issue
Block a user