Merge branch 'master' into lighting

This commit is contained in:
Mark van Alphen
2019-04-30 19:15:58 +02:00
committed by GitHub
153 changed files with 4611 additions and 3785 deletions
@@ -28,6 +28,46 @@ Thus, the two variables affect pump operation are set in New():
var/id = null
var/datum/radio_frequency/radio_connection
/obj/machinery/atmospherics/binary/pump/CtrlClick(mob/living/user)
if(!istype(user) || user.incapacitated())
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(!in_range(src, user) && !issilicon(usr))
return
if(!ishuman(usr) && !issilicon(usr))
return
toggle()
return ..()
/obj/machinery/atmospherics/binary/pump/AICtrlClick()
toggle()
return ..()
/obj/machinery/atmospherics/binary/pump/AltClick(mob/living/user)
if(!istype(user) || user.incapacitated())
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(!in_range(src, user) && !issilicon(usr))
return
if(!ishuman(usr) && !issilicon(usr))
return
set_max()
return
/obj/machinery/atmospherics/binary/pump/AIAltClick()
set_max()
return ..()
/obj/machinery/atmospherics/binary/pump/proc/toggle()
if(powered())
on = !on
update_icon()
/obj/machinery/atmospherics/binary/pump/proc/set_max()
if(powered())
target_pressure = MAX_OUTPUT_PRESSURE
update_icon()
/obj/machinery/atmospherics/binary/pump/Destroy()
if(SSradio)
SSradio.remove_object(src, frequency)
@@ -205,7 +245,15 @@ Thus, the two variables affect pump operation are set in New():
update_icon()
/obj/machinery/atmospherics/binary/pump/attackby(obj/item/W, mob/user, params)
if(!istype(W, /obj/item/wrench))
if(istype(W, /obj/item/pen))
var/t = copytext(stripped_input(user, "Enter the name for the pump.", "Rename", name), 1, MAX_NAME_LEN)
if(!t)
return
if(!in_range(src, usr) && loc != usr)
return
name = t
return
else if(!istype(W, /obj/item/wrench))
return ..()
if(!(stat & NOPOWER) && on)
to_chat(user, "<span class='alert'>You cannot unwrench this [src], turn it off first.</span>")
@@ -28,6 +28,46 @@ Thus, the two variables affect pump operation are set in New():
var/id = null
var/datum/radio_frequency/radio_connection
/obj/machinery/atmospherics/binary/volume_pump/CtrlClick(mob/living/user)
if(!istype(user) || user.incapacitated())
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(!in_range(src, user) && !issilicon(usr))
return
if(!ishuman(usr) && !issilicon(usr))
return
toggle()
return ..()
/obj/machinery/atmospherics/binary/volume_pump/AICtrlClick()
toggle()
return ..()
/obj/machinery/atmospherics/binary/volume_pump/AltClick(mob/living/user)
if(!istype(user) || user.incapacitated())
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(!in_range(src, user) && !issilicon(usr))
return
if(!ishuman(usr) && !issilicon(usr))
return
set_max()
return
/obj/machinery/atmospherics/binary/volume_pump/AIAltClick()
set_max()
return ..()
/obj/machinery/atmospherics/binary/volume_pump/proc/toggle()
if(powered())
on = !on
update_icon()
/obj/machinery/atmospherics/binary/volume_pump/proc/set_max()
if(powered())
transfer_rate = MAX_TRANSFER_RATE
update_icon()
/obj/machinery/atmospherics/binary/volume_pump/Destroy()
if(SSradio)
SSradio.remove_object(src, frequency)
@@ -201,7 +241,15 @@ Thus, the two variables affect pump operation are set in New():
update_icon()
/obj/machinery/atmospherics/binary/volume_pump/attackby(obj/item/W, mob/user, params)
if(!istype(W, /obj/item/wrench))
if(istype(W, /obj/item/pen))
var/t = copytext(stripped_input(user, "Enter the name for the volume pump.", "Rename", name), 1, MAX_NAME_LEN)
if(!t)
return
if(!in_range(src, usr) && loc != usr)
return
name = t
return
else if(!istype(W, /obj/item/wrench))
return ..()
if(!(stat & NOPOWER) && on)
to_chat(user, "<span class='alert'>You cannot unwrench this [src], turn it off first.</span>")