mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
Reduce lines by removing blank lines added by PJ's script
This commit is contained in:
@@ -78,12 +78,10 @@
|
||||
emag_act(user as mob)
|
||||
if(!writer)
|
||||
to_chat(usr, "You insert \the card, and the computer grinds, sparks, and beeps. After a moment, the card ejects itself.")
|
||||
|
||||
computer.emagged = 1
|
||||
return 1
|
||||
else
|
||||
to_chat(usr, "You are unable to insert \the card, as the reader slot is occupied")
|
||||
|
||||
return 0
|
||||
|
||||
attackby(var/obj/item/I as obj, var/mob/user as mob, params)
|
||||
@@ -101,7 +99,6 @@
|
||||
// This shouldn't happen, just in case..
|
||||
if(slot == 2 && !dualslot)
|
||||
to_chat(usr, "This device has only one card slot")
|
||||
|
||||
return 0
|
||||
|
||||
var/mob/living/L = usr
|
||||
@@ -109,31 +106,23 @@
|
||||
if(1)
|
||||
if(equip_to_reader(card, L))
|
||||
to_chat(usr, "You insert the card into reader slot")
|
||||
|
||||
else
|
||||
to_chat(usr, "There is already something in the reader slot.")
|
||||
|
||||
if(2)
|
||||
if(equip_to_writer(card, L))
|
||||
to_chat(usr, "You insert the card into writer slot")
|
||||
|
||||
else
|
||||
to_chat(usr, "There is already something in the reader slot.")
|
||||
|
||||
if(3)
|
||||
if(equip_to_reader(card, L))
|
||||
to_chat(usr, "You insert the card into reader slot")
|
||||
|
||||
else if (equip_to_writer(card, L) && dualslot)
|
||||
to_chat(usr, "You insert the card into writer slot")
|
||||
|
||||
else if (dualslot)
|
||||
to_chat(usr, "There is already something in both slots.")
|
||||
|
||||
else
|
||||
to_chat(usr, "There is already something in the reader slot.")
|
||||
|
||||
|
||||
// Usage of insert() preferred, as it also tells result to the user.
|
||||
proc/equip_to_reader(var/obj/item/weapon/card/card, var/mob/living/L)
|
||||
if(!reader)
|
||||
@@ -159,48 +148,36 @@
|
||||
if(1)
|
||||
if (remove_reader(L))
|
||||
to_chat(L, "You remove the card from reader slot")
|
||||
|
||||
else
|
||||
to_chat(L, "There is no card in the reader slot")
|
||||
|
||||
if(2)
|
||||
if (remove_writer(L))
|
||||
to_chat(L, "You remove the card from writer slot")
|
||||
|
||||
else
|
||||
to_chat(L, "There is no card in the writer slot")
|
||||
|
||||
if(3)
|
||||
if (remove_reader(L))
|
||||
if (remove_writer(L))
|
||||
to_chat(L, "You remove cards from both slots")
|
||||
|
||||
else
|
||||
to_chat(L, "You remove the card from reader slot")
|
||||
|
||||
else
|
||||
if(remove_writer(L))
|
||||
to_chat(L, "You remove the card from writer slot")
|
||||
|
||||
else
|
||||
to_chat(L, "There are no cards in both slots")
|
||||
|
||||
if(4)
|
||||
if (!remove_reader(L))
|
||||
if (remove_writer(L))
|
||||
to_chat(L, "You remove the card from writer slot")
|
||||
|
||||
else if (!dualslot)
|
||||
to_chat(L, "There is no card in the reader slot")
|
||||
|
||||
else
|
||||
to_chat(L, "There are no cards in both slots")
|
||||
|
||||
else
|
||||
to_chat(L, "You remove the card from reader slot")
|
||||
|
||||
|
||||
|
||||
proc/remove_reader(var/mob/living/L)
|
||||
if(reader)
|
||||
reader.loc = loc
|
||||
@@ -263,7 +240,6 @@
|
||||
if(slot == 1) // 1: writer
|
||||
if(writer != null)
|
||||
to_chat(usr, "There's already a card in that slot!")
|
||||
|
||||
return 0
|
||||
var/mob/living/L = usr
|
||||
L.drop_item()
|
||||
@@ -273,7 +249,6 @@
|
||||
else if(slot == 2) // 2: reader
|
||||
if(reader != null)
|
||||
to_chat(usr, "There's already a card in that slot!")
|
||||
|
||||
return 0
|
||||
var/mob/living/L = usr
|
||||
L.drop_item()
|
||||
@@ -283,7 +258,6 @@
|
||||
else // 0: auto
|
||||
if(reader && writer)
|
||||
to_chat(usr, "Both slots are full!")
|
||||
|
||||
return 0
|
||||
var/mob/living/L = usr
|
||||
L.drop_item()
|
||||
|
||||
Reference in New Issue
Block a user