diff --git a/code/game/machinery/computer3/lapvend.dm b/code/game/machinery/computer3/lapvend.dm index 416472a31ac..ac3e7e172cf 100644 --- a/code/game/machinery/computer3/lapvend.dm +++ b/code/game/machinery/computer3/lapvend.dm @@ -38,16 +38,14 @@ /obj/machinery/lapvend/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(vendmode == 1) - if(istype(W, /obj/item/weapon/card)) - var/obj/item/weapon/card/I = W - scan_card(I) + var/obj/item/weapon/card/id/I = W.GetID() + + if(vendmode == 1 && I) + scan_id(I, W) + vendmode = 0 + if(vendmode == 3 && I) + if(reimburse_id(I, W)) vendmode = 0 - if(vendmode == 3) - if(istype(W,/obj/item/weapon/card)) - var/obj/item/weapon/card/I = W - if(reimburse(I)) - vendmode = 0 if(vendmode == 0) if(istype(W, /obj/item/device/laptop)) var/obj/item/device/laptop/L = W @@ -210,26 +208,24 @@ newlap.spawn_parts() -/obj/machinery/lapvend/proc/scan_card(var/obj/item/weapon/card/I) - if (istype(I, /obj/item/weapon/card/id)) - var/obj/item/weapon/card/id/C = I - visible_message("[usr] swipes a card through [src].") - var/datum/money_account/CH = get_account(C.associated_account_number) - if(!CH) - usr << "\icon[src]No valid account number is associated with this card." - return - if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2) - if(vendor_account) - var/attempt_pin = input("Enter pin code", "Vendor transaction") as num - var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2) - if(D) - transfer_and_vend(D, C) - else - usr << "\icon[src]Unable to access account. Check security settings and try again." +/obj/machinery/lapvend/proc/scan_id(var/obj/item/weapon/card/id/C, var/obj/item/I) + visible_message("\The [usr] swipes \the [I] through \the [src].") + var/datum/money_account/CH = get_account(C.associated_account_number) + if(!CH) + usr << "\icon[src]No valid account number is associated with this card." + return + if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2) + if(vendor_account) + var/attempt_pin = input("Enter pin code", "Vendor transaction") as num + var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2) + if(D) + transfer_and_vend(D, C) else usr << "\icon[src]Unable to access vendor account. Please record the machine ID and call CentComm Support." else - transfer_and_vend(CH, C) + usr << "\icon[src]Unable to access vendor account. Please record the machine ID and call CentComm Support." + else + transfer_and_vend(CH, C) // Transfers money and vends the laptop. @@ -361,30 +357,28 @@ -/obj/machinery/lapvend/proc/reimburse(var/obj/item/weapon/card/I) - if (istype(I, /obj/item/weapon/card/id)) - var/obj/item/weapon/card/id/C = I - visible_message("[usr] swipes a card through [src].") - var/datum/money_account/CH = get_account(C.associated_account_number) - if(!CH) - usr << "\icon[src]No valid account number is associated with this card." - return 0 - if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2) - if(vendor_account) - var/attempt_pin = input("Enter pin code", "Vendor transaction") as num - var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2) - if(D) - transfer_and_reimburse(D) - return 1 - else - usr << "\icon[src]Unable to access account. Check security settings and try again." - return 0 +/obj/machinery/lapvend/proc/reimburse_id(var/obj/item/weapon/card/id/C, var/obj/item/I) + visible_message("\The [usr] swipes \the [I] through \the [src].") + var/datum/money_account/CH = get_account(C.associated_account_number) + if(!CH) + usr << "\icon[src]No valid account number is associated with this card." + return 0 + if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2) + if(vendor_account) + var/attempt_pin = input("Enter pin code", "Vendor transaction") as num + var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2) + if(D) + transfer_and_reimburse(D) + return 1 else usr << "\icon[src]Unable to access vendor account. Please record the machine ID and call CentComm Support." return 0 else - transfer_and_reimburse(CH) - return 1 + usr << "\icon[src]Unable to access vendor account. Please record the machine ID and call CentComm Support." + return 0 + else + transfer_and_reimburse(CH) + return 1 /obj/machinery/lapvend/proc/transfer_and_reimburse(var/datum/money_account/D) var/transaction_amount = total() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm index 8c49fc0d9f3..d91b22fe74d 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm @@ -66,11 +66,12 @@ src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet user.drop_item() if (W) W.forceMove(src.loc) - else if(istype(W, /obj/item/weapon/card/id)) + else if(W.GetID()) + var/obj/item/weapon/card/id/I = W.GetID() + if(src.broken) user << "It appears to be broken." return - var/obj/item/weapon/card/id/I = W if(!I || !I.registered_name) return if(src.allowed(user) || !src.registered_name || (istype(I) && (src.registered_name == I.registered_name))) //they can open all lockers, or nobody owns this, or they own this locker diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 977059ab958..4428e734c2e 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -38,6 +38,7 @@ return name = "[seed.seed_name]" + trash = seed.get_trash_type() update_icon() diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index efe3bf1da68..14dc0b9a587 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -68,6 +68,9 @@ /datum/seed/proc/get_trait(var/trait) return traits["[trait]"] +/datum/seed/proc/get_trash_type() + return trash_type + /datum/seed/proc/set_trait(var/trait,var/nval,var/ubound,var/lbound, var/degrade) if(!isnull(degrade)) nval *= degrade if(!isnull(ubound)) nval = min(nval,ubound) diff --git a/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm b/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm index 5fbe8dcd41f..c8e0f78dca8 100644 --- a/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm +++ b/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm @@ -257,7 +257,7 @@ var/list/valid_secondary_effect_types = list(\ my_effect.ToggleActivate() if(secondary_effect && secondary_effect.trigger == TRIGGER_WATER && prob(25)) secondary_effect.ToggleActivate(0) - else if(W.reagents.has_reagent("acid", 1) || W.reagents.has_reagent("pacid", 1) || W.reagents.has_reagent("diethylamine", 1)) + else if(W.reagents.has_reagent("sacid", 1) || W.reagents.has_reagent("pacid", 1) || W.reagents.has_reagent("diethylamine", 1)) if(my_effect.trigger == TRIGGER_ACID) my_effect.ToggleActivate() if(secondary_effect && secondary_effect.trigger == TRIGGER_ACID && prob(25)) diff --git a/html/changelog.html b/html/changelog.html index a67817b71ca..c917658ccd8 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,13 @@ -->
+

22 November 2015

+

neersighted updated:

+ +

27 October 2015

HarpyEagle updated: