diff --git a/code/modules/modular_computers/laptop_vendor.dm b/code/modules/modular_computers/laptop_vendor.dm index 341e58739e9..25a15fc88b2 100644 --- a/code/modules/modular_computers/laptop_vendor.dm +++ b/code/modules/modular_computers/laptop_vendor.dm @@ -230,7 +230,10 @@ return 0 /obj/machinery/lapvend/attack_hand(var/mob/user) - ui_interact(user) + if(anchored) + ui_interact(user) + else + to_chat(user, span("notice","[src] needs to be anchored to the floor to function!")) /obj/machinery/lapvend/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) if(stat & (BROKEN | NOPOWER | MAINT)) @@ -262,9 +265,9 @@ obj/machinery/lapvend/attackby(obj/item/weapon/W as obj, mob/user as mob) - var/obj/item/weapon/card/id/I = W.GetID() // Awaiting payment state if(state == 2) + var/obj/item/weapon/card/id/I = W.GetID() if(process_payment(I,W)) fabricate_and_recalc_price(1) if((devtype == 1) && fabricated_laptop) @@ -284,9 +287,21 @@ obj/machinery/lapvend/attackby(obj/item/weapon/W as obj, mob/user as mob) state = 3 return 1 return 0 + else if(W.iswrench()) + user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) + playsound(src.loc, W.usesound, 100, 1) + if(anchored) + user.visible_message("[user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.") + else + user.visible_message("[user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.") + if(do_after(user, 20/W.toolspeed)) + if(!src) + return + to_chat(user, span("notice","You [anchored? "un" : ""]secured \the [src]!")) + anchored = !anchored + return return ..() - // Simplified payment processing, returns 1 on success. /obj/machinery/lapvend/proc/process_payment(var/obj/item/weapon/card/id/I, var/obj/item/ID_container) var/obj/item/weapon/spacecash/S = null diff --git a/html/changelogs/191104-coding_laptopvendor.yml b/html/changelogs/191104-coding_laptopvendor.yml new file mode 100644 index 00000000000..661bba63c9f --- /dev/null +++ b/html/changelogs/191104-coding_laptopvendor.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: Ferner + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - tweak: "The laptop vendor can now be unanchored."