mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
Merge pull request #6717 from Menshin/ambiguous_expression_fix
Fixes being unable to craft 1x multiplier items from stacks
This commit is contained in:
@@ -81,7 +81,7 @@
|
|||||||
title+= "[R.title]"
|
title+= "[R.title]"
|
||||||
title+= " ([R.req_amount] [src.singular_name]\s)"
|
title+= " ([R.req_amount] [src.singular_name]\s)"
|
||||||
if (can_build)
|
if (can_build)
|
||||||
t1 += text("<A href='?src=\ref[src];sublist=[recipes_sublist];make=[i]'>[title]</A> ")
|
t1 += text("<A href='?src=\ref[src];sublist=[recipes_sublist];make=[i];multiplier=1'>[title]</A> ")
|
||||||
else
|
else
|
||||||
t1 += text("[]", title)
|
t1 += text("[]", title)
|
||||||
continue
|
continue
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
recipes_list = srl.recipes
|
recipes_list = srl.recipes
|
||||||
var/datum/stack_recipe/R = recipes_list[text2num(href_list["make"])]
|
var/datum/stack_recipe/R = recipes_list[text2num(href_list["make"])]
|
||||||
var/multiplier = text2num(href_list["multiplier"])
|
var/multiplier = text2num(href_list["multiplier"])
|
||||||
if (multiplier <= 0) //href exploit protection
|
if (!multiplier || (multiplier <= 0)) //href exploit protection
|
||||||
return
|
return
|
||||||
if (src.amount < R.req_amount*multiplier)
|
if (src.amount < R.req_amount*multiplier)
|
||||||
if (R.req_amount*multiplier>1)
|
if (R.req_amount*multiplier>1)
|
||||||
|
|||||||
Reference in New Issue
Block a user