Changelog, mommi fixes.

This commit is contained in:
Rob Nelson
2014-05-24 18:16:27 -07:00
parent 2b9ca47c9b
commit 9fc56a89c0
4 changed files with 18 additions and 10 deletions

View File

@@ -202,7 +202,7 @@ var/global/list/autolathe_recipes_hidden = list( \
return 1
else
var/mob/living/silicon/robot/mommi/M = user
if(M.is_in_modules(O))
if(M.is_in_modules(O,permit_sheets=1))
user << "\red You can't put something built into you in [src]."
return 1
if (src.m_amount + O.m_amt > max_m_amount)
@@ -267,7 +267,7 @@ var/global/list/autolathe_recipes_hidden = list( \
if (!busy)
if(href_list["make"])
var/turf/T = get_step(src.loc, get_dir(src,usr))
// critical exploit fix start -walter0o
var/obj/item/template = null
var/attempting_to_build = locate(href_list["make"])
@@ -279,25 +279,25 @@ var/global/list/autolathe_recipes_hidden = list( \
template = attempting_to_build
else // somebody is trying to exploit, alert admins -walter0o
var/turf/LOC = get_turf(usr)
message_admins("[key_name_admin(usr)] tried to exploit an autolathe to duplicate <a href='?_src_=vars;Vars=\ref[attempting_to_build]'>[attempting_to_build]</a> ! ([LOC ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[LOC.x];Y=[LOC.y];Z=[LOC.z]'>JMP</a>" : "null"])", 0)
log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe to duplicate [attempting_to_build] !")
log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe to duplicate [attempting_to_build] !")
return
// now check for legit multiplier, also only stacks should pass with one to prevent raw-materials-manipulation -walter0o
var/multiplier = text2num(href_list["multiplier"])
if (!multiplier) multiplier = 1
var/max_multiplier = 1
if(istype(template, /obj/item/stack)) // stacks are the only items which can have a multiplier higher than 1 -walter0o
var/obj/item/stack/S = template
max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY) // pasta from regular_win() to make sure the numbers match -walter0o
if( (multiplier > max_multiplier) || (multiplier <= 0) ) // somebody is trying to exploit, alert admins-walter0o
var/turf/LOC = get_turf(usr)
message_admins("[key_name_admin(usr)] tried to exploit an autolathe with multiplier set to <u>[multiplier]</u> on <u>[template]</u> ! ([LOC ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[LOC.x];Y=[LOC.y];Z=[LOC.z]'>JMP</a>" : "null"])" , 0)
log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe with multiplier set to [multiplier] on [template] !")

View File

@@ -5,14 +5,14 @@
/mob/living/silicon/robot/mommi/get_active_hand()
return module_active
/mob/living/silicon/robot/mommi/proc/is_in_modules(obj/item/W)
/mob/living/silicon/robot/mommi/proc/is_in_modules(obj/item/W, var/permit_sheets=0)
if(istype(W, src.module.emag.type))
return src.module.emag
// Exact matching for stacks (so we can load machines)
if(istype(W, /obj/item/stack/sheet))
for(var/obj/item/stack/sheet/S in src.module.modules)
if(S.type==W.type)
return S
return permit_sheets ? 0 : S
else
return locate(W) in src.module.modules

View File

@@ -86,7 +86,7 @@ Note: Must be placed within 3 tiles of the R&D Console
if(isrobot(user)) //Don't put your module items in there!
if(isMoMMI(user))
var/mob/living/silicon/robot/mommi/mommi = user
if(mommi.is_in_modules(O))
if(mommi.is_in_modules(O,permit_sheets=1))
user << "\red You cannot insert something that is part of you."
return
else

View File

@@ -75,6 +75,14 @@
<!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here -->
<!-- Suggestion: Group changes not merged into master into a single [IN DEVELOPMENT] block, then change the date to today before merging. Makes the changes from the last release a bit easier to comprehend. -->
<div class="commit sansserif">
<h2 class="date">2014.05.24</h2>
<h3 class="author">N3X15 updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">Vox Heist objective fixes and tweaks.</li>
<li class="tweak">MoMMIs can insert metal and glass into autolathes and circuit imprinters.</li>
</ul>
</div>
<div class="commit sansserif">
<h2 class="date">2014.05.22</h2>
<h3 class="author">Kokuten updated:</h3>