diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index 60e869815b..9a371e3de0 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -250,15 +250,13 @@ return ..() /obj/item/card/id/proc/insert_money(obj/item/I, mob/user, physical_currency) + if(!registered_account) + to_chat(user, "[src] doesn't have a linked account to deposit [I] into!") + return var/cash_money = I.get_item_credit_value() if(!cash_money) to_chat(user, "[I] doesn't seem to be worth anything!") return - - if(!registered_account) - to_chat(user, "[src] doesn't have a linked account to deposit [I] into!") - return - registered_account.adjust_money(cash_money) if(physical_currency) to_chat(user, "You stuff [I] into [src]. It disappears in a small puff of bluespace smoke, adding [cash_money] credits to the linked account.") @@ -269,17 +267,20 @@ qdel(I) /obj/item/card/id/proc/mass_insert_money(list/money, mob/user) + if(!registered_account) + to_chat(user, "[src] doesn't have a linked account to deposit into!") + return FALSE + if (!money || !money.len) return FALSE var/total = 0 for (var/obj/item/physical_money in money) - var/cash_money = physical_money.get_item_credit_value() + total += physical_money.get_item_credit_value() + CHECK_TICK - total += cash_money - - registered_account.adjust_money(cash_money) + registered_account.adjust_money(total) QDEL_LIST(money) diff --git a/code/modules/mining/mint.dm b/code/modules/mining/mint.dm index e89bbef58d..84c6c416b7 100644 --- a/code/modules/mining/mint.dm +++ b/code/modules/mining/mint.dm @@ -11,7 +11,7 @@ var/chosen = /datum/material/iron //which material will be used to make coins var/coinsToProduce = 10 speed_process = TRUE - + var/obj/item/storage/bag/money/bag_to_use /obj/machinery/mineral/mint/Initialize() . = ..() @@ -118,9 +118,8 @@ temp_list[chosen] = 400 if(T) var/obj/item/O = new /obj/item/coin(src) - var/obj/item/storage/bag/money/B = locate(/obj/item/storage/bag/money, T) O.set_custom_materials(temp_list) - if(!B) - B = new /obj/item/storage/bag/money(src) - unload_mineral(B) - O.forceMove(B) + if(QDELETED(bag_to_use) || (bag_to_use.loc != T) || !SEND_SIGNAL(bag_to_use, COMSIG_TRY_STORAGE_INSERT, O, null, TRUE)) //important to send the signal so we don't overfill the bag. + bag_to_use = new(src) //make a new bag if we can't find or use the old one. + unload_mineral(bag_to_use) //just forcemove memes. + O.forceMove(bag_to_use) //don't bother sending the signal, the new bag is empty and all that. diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index b109598973..b40d87a68a 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -1,4 +1,6 @@ /mob/living/carbon/BiologicalLife(seconds, times_fired) + //Updates the number of stored chemicals for powers + handle_changeling() //Reagent processing needs to come before breathing, to prevent edge cases. handle_organs() . = ..() // if . is false, we are dead. @@ -25,8 +27,6 @@ if(stat != DEAD) handle_liver() - //Updates the number of stored chemicals for powers - handle_changeling() /mob/living/carbon/PhysicalLife(seconds, times_fired) if(!(. = ..())) diff --git a/html/changelog.html b/html/changelog.html index f0ba168a06..ebc042889c 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -57,6 +57,10 @@
  • sec and medical records have been added to character setup.
  • circuit reagent heaters are now sanitized for temperature from 2.7 to 1000.
  • +

    timothyteakettle updated:

    +

    13 July 2020

    Linzolle updated:

    diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index 719fa4bef3..31b63b7503 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -26356,3 +26356,5 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. - rscadd: sec and medical records have been added to character setup. - bugfix: circuit reagent heaters are now sanitized for temperature from 2.7 to 1000. + timothyteakettle: + - bugfix: ports a money bag exploit