mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-26 02:02:39 +00:00
Replaces \blue and \red with spans, removes unnecessary SRCs and :s, Fixes Negative Cable Coil Bug
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
else if(istype(used_atom, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = used_atom
|
||||
if(C.amount<4)
|
||||
to_chat(user, ("There's not enough cable to finish the task."))
|
||||
to_chat(user, ("<span class='warning'>There's not enough cable to finish the task.</span>"))
|
||||
return 0
|
||||
else
|
||||
C.use(4)
|
||||
@@ -69,7 +69,7 @@
|
||||
else if(istype(used_atom, /obj/item/stack))
|
||||
var/obj/item/stack/S = used_atom
|
||||
if(S.amount < 5)
|
||||
to_chat(user, ("There's not enough material in this stack."))
|
||||
to_chat(user, ("<span class='warning'>There's not enough material in this stack.</span>"))
|
||||
return 0
|
||||
else
|
||||
S.use(5)
|
||||
@@ -106,30 +106,29 @@
|
||||
return
|
||||
|
||||
proc/try_consume(mob/user as mob, atom/used_atom, amount)
|
||||
if(amount>0)
|
||||
// STACKS
|
||||
if(istype(used_atom,/obj/item/stack))
|
||||
var/obj/item/stack/stack=used_atom
|
||||
if(stack.amount < amount)
|
||||
to_chat(user, "\red You don't have enough [stack]! You need at least [amount].")
|
||||
return 0
|
||||
stack.use(amount)
|
||||
if(amount > 0)
|
||||
// CABLES
|
||||
if(istype(used_atom,/obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/coil=used_atom
|
||||
if(coil.amount < amount)
|
||||
to_chat(user, "\red You don't have enough cable! You need at least [amount] coils.")
|
||||
if(!coil.use(amount))
|
||||
to_chat(user, "<span class='warning'>You don't have enough cable! You need at least [amount] coils.</span>")
|
||||
return 0
|
||||
coil.use(amount)
|
||||
// WELDER
|
||||
if(istype(used_atom,/obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/welder=used_atom
|
||||
if(!welder.isOn())
|
||||
to_chat(user, "\blue You tap the [src] with your unlit welder. [pick("Ding","Dong")].")
|
||||
to_chat(user, "<span class='notice'>You tap the [src] with your unlit welder. [pick("Ding","Dong")].</span>")
|
||||
return 0
|
||||
if(!welder.remove_fuel(amount,user))
|
||||
to_chat(user, "\red You don't have enough fuel!")
|
||||
to_chat(user, "<span class='warning'>You don't have enough fuel!</span>")
|
||||
return 0
|
||||
// STACKS
|
||||
if(istype(used_atom,/obj/item/stack))
|
||||
var/obj/item/stack/stack=used_atom
|
||||
if(stack.amount < amount)
|
||||
to_chat(user, "<span class='warning'>You don't have enough [stack]! You need at least [amount].</span>")
|
||||
return 0
|
||||
stack.use(amount)
|
||||
return 1
|
||||
|
||||
/datum/construction/reversible
|
||||
|
||||
Reference in New Issue
Block a user