mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-27 14:09:17 +01:00
Science TGUI & More (#3901)
* Day 1 * Circuits, Bots, UAV * Fixes * Cleaning * Finished Science * e * asdasd * aesfesf * Fix Medibots (including the bee one) * Bleh * Fixes RPD with some code improvements * RCON Patch * RCON PATCHES * Rename popper.tsx to Popper.tsx * Rename popper.stories.js to Popper.stories.js * Yarn and Popper Updates * I am going to shit bricks * So Tired * asdas * Finally fixed tanks * Radio is fixed * Fixes Pipes * RCD SCROLLING! * Fixes Chat (because everyone uses hybrid???) * Fixes bugged themes * habhabahab - Fixes Air Alarm modes * Fixes Medibot UI and UI Action Buttons * Fixing say_emphasis missing on NIF messages * a
This commit is contained in:
@@ -475,3 +475,24 @@
|
||||
New(title, recipes)
|
||||
src.title = title
|
||||
src.recipes = recipes
|
||||
|
||||
/obj/item/stack/proc/set_amount(var/new_amount, var/no_limits = FALSE)
|
||||
if(new_amount < 0 || new_amount % 1)
|
||||
stack_trace("Tried to set a bad stack amount: [new_amount]")
|
||||
return 0
|
||||
|
||||
// Clean up the new amount
|
||||
new_amount = max(round(new_amount), 0)
|
||||
|
||||
// Can exceed max if you really want
|
||||
if(new_amount > max_amount && !no_limits)
|
||||
new_amount = max_amount
|
||||
|
||||
amount = new_amount
|
||||
|
||||
// Can set it to 0 without qdel if you really want
|
||||
if(amount == 0 && !no_limits)
|
||||
qdel(src)
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user