diff --git a/code/game/machinery/roulette_machine.dm b/code/game/machinery/roulette_machine.dm index ed732bc1cb6f..dad9301d1664 100644 --- a/code/game/machinery/roulette_machine.dm +++ b/code/game/machinery/roulette_machine.dm @@ -86,7 +86,7 @@ data["AccountBalance"] = C.registered_account.account_balance else data["AccountBalance"] = 0 - data["CanUnbolt"] = (H.get_idcard() == my_card) + data["CanUnbolt"] = (C == my_card) return data @@ -96,8 +96,10 @@ return switch(action) - if("anchor") + if("anchor" && "CanUnbolt") set_anchored(!anchored) + else + return . = TRUE if("ChangeBetAmount") chosen_bet_amount = clamp(text2num(params["amount"]), 10, 500) @@ -117,7 +119,7 @@ if(istype(W, /obj/item/card/bank)) playsound(src, 'sound/machines/card_slide.ogg', 50, TRUE) - if(machine_stat & MAINT || !on || locked) + if(machine_stat & MAINT || !on || locked || !powered()) to_chat(user, "The machine appears to be disabled.") return FALSE