Skip to content

Commit

Permalink
[s] Fixes for new 515 features (cmss13-devs#5633)
Browse files Browse the repository at this point in the history
# About the pull request

Apparently these changes are features. Thanks 515.

But in reality, this desperately needs to be tguified.

# Explain why it's good for the game

The "features" are not good for the game.

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog

If you know you know.
  • Loading branch information
Drulikar committed Feb 3, 2024
1 parent c20267c commit aa8ff1a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions code/game/objects/items/stacks/stack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,21 @@ Also change the icon to reflect the amount of sheets, if possible.*/
list_recipes(usr, text2num(href_list["sublist"]))

if(href_list["make"])
if(amount < 1) qdel(src) //Never should happen
if(amount < 1)
qdel(src) //Never should happen
return

var/list/recipes_list = recipes
if(href_list["sublist"])
var/datum/stack_recipe_list/srl = recipes_list[text2num(href_list["sublist"])]
recipes_list = srl.recipes
var/datum/stack_recipe/R = recipes_list[text2num(href_list["make"])]
var/multiplier = text2num(href_list["multiplier"])
if(!isnum(multiplier))
if(multiplier != multiplier) // isnan
message_admins("[key_name_admin(usr)] has attempted to multiply [src] with NaN")
return
if(!isnum(multiplier)) // this used to block nan...
message_admins("[key_name_admin(usr)] has attempted to multiply [src] with !isnum")
return
multiplier = round(multiplier)
if(multiplier < 1)
Expand Down

0 comments on commit aa8ff1a

Please sign in to comment.