April sync (#360)

* Maps and things no code/icons

* helpers defines globalvars

* Onclick world.dm orphaned_procs

* subsystems

Round vote and shuttle autocall done here too

* datums

* Game folder

* Admin - chatter modules

* clothing - mining

* modular computers - zambies

* client

* mob level 1

* mob stage 2 + simple_animal

* silicons n brains

* mob stage 3 + Alien/Monkey

* human mobs

* icons updated

* some sounds

* emitter y u no commit

* update tgstation.dme

* compile fixes

* travis fixes

Also removes Fast digest mode, because reasons.

* tweaks for travis Mentors are broke again

Also fixes Sizeray guns

* oxygen loss fix for vore code.

* removes unused code

* some code updates

* bulk fixes

* further fixes

* outside things

* whoops.

* Maint bar ported

* GLOBs.
This commit is contained in:
Poojawa
2017-04-13 23:37:00 -05:00
committed by GitHub
parent cdc32c98fa
commit 7e9b96a00f
1322 changed files with 174827 additions and 23888 deletions
+2 -2
View File
@@ -222,7 +222,7 @@
update()
conveyors = list()
for(var/obj/machinery/conveyor/C in machines)
for(var/obj/machinery/conveyor/C in GLOB.machines)
if(C.id == id)
conveyors += C
@@ -271,7 +271,7 @@
update()
// find any switches with same id as this one, and set their positions to match us
for(var/obj/machinery/conveyor_switch/S in machines)
for(var/obj/machinery/conveyor_switch/S in GLOB.machines)
if(S.id == src.id)
S.position = position
S.update()
@@ -251,7 +251,7 @@
else if(ptype == DISP_END_BIN)
var/obj/machinery/disposal/bin/B = new /obj/machinery/disposal/bin(loc,src)
B.mode = 0 // start with pump off
B.pressure_charging = FALSE // start with pump off
transfer_fingerprints_to(B)
else if(ptype == DISP_END_OUTLET)
@@ -329,7 +329,7 @@
stored.anchored = 1
stored.update_icon()
else
for(var/D in cardinal)
for(var/D in GLOB.cardinal)
if(D & dpdir)
var/obj/structure/disposalpipe/broken/P = new(src.loc)
P.setDir(D)
@@ -425,7 +425,7 @@
if(sortTypes.len>0)
to_chat(user, "It is tagged with the following tags:")
for(var/t in sortTypes)
to_chat(user, TAGGERLOCATIONS[t])
to_chat(user, GLOB.TAGGERLOCATIONS[t])
else
to_chat(user, "It has no sorting tags set.")
@@ -467,10 +467,10 @@
if(O.currTag > 0)// Tag set
if(O.currTag in sortTypes)
sortTypes -= O.currTag
to_chat(user, "<span class='notice'>Removed \"[TAGGERLOCATIONS[O.currTag]]\" filter.</span>")
to_chat(user, "<span class='notice'>Removed \"[GLOB.TAGGERLOCATIONS[O.currTag]]\" filter.</span>")
else
sortTypes |= O.currTag
to_chat(user, "<span class='notice'>Added \"[TAGGERLOCATIONS[O.currTag]]\" filter.</span>")
to_chat(user, "<span class='notice'>Added \"[GLOB.TAGGERLOCATIONS[O.currTag]]\" filter.</span>")
playsound(src.loc, 'sound/machines/twobeep.ogg', 100, 1)
else
return ..()
@@ -731,7 +731,7 @@
if(direction)
dirs = list( direction, turn(direction, -45), turn(direction, 45))
else
dirs = alldirs.Copy()
dirs = GLOB.alldirs.Copy()
src.streak(dirs)
@@ -740,6 +740,6 @@
if(direction)
dirs = list( direction, turn(direction, -45), turn(direction, 45))
else
dirs = alldirs.Copy()
dirs = GLOB.alldirs.Copy()
src.streak(dirs)
+42 -40
View File
@@ -12,8 +12,10 @@
obj_integrity = 200
max_integrity = 200
resistance_flags = FIRE_PROOF
interact_open = TRUE
var/datum/gas_mixture/air_contents // internal reservoir
var/mode = PRESSURE_ON
var/full_pressure = FALSE
var/pressure_charging = TRUE
var/flush = 0 // true if flush handle is pulled
var/obj/structure/disposalpipe/trunk/trunk = null // the attached pipe trunk
var/flushing = 0 // true if flushing in progress
@@ -43,11 +45,11 @@
/obj/machinery/disposal/proc/trunk_check()
trunk = locate() in loc
if(!trunk)
mode = PRESSURE_OFF
flush = 0
pressure_charging = FALSE
flush = FALSE
else
if(initial(mode))
mode = PRESSURE_ON
if(initial(pressure_charging))
pressure_charging = TRUE
flush = initial(flush)
trunk.linked = src // link the pipe trunk to self
@@ -76,21 +78,18 @@
/obj/machinery/disposal/attackby(obj/item/I, mob/user, params)
add_fingerprint(user)
if(mode != PRESSURE_ON && mode != PRESSURE_MAXED && !flush)
if(!pressure_charging && !full_pressure && !flush)
if(istype(I, /obj/item/weapon/screwdriver))
if(mode == PRESSURE_OFF)
mode = SCREWS_OUT
else
mode = PRESSURE_OFF
playsound(src.loc, I.usesound, 50, 1)
to_chat(user, "<span class='notice'>You [mode == SCREWS_OUT ? "remove":"attach"] the screws around the power connection.</span>")
panel_open = !panel_open
playsound(get_turf(src), I.usesound, 50, 1)
to_chat(user, "<span class='notice'>You [panel_open ? "remove":"attach"] the screws around the power connection.</span>")
return
else if(istype(I,/obj/item/weapon/weldingtool) && mode == SCREWS_OUT)
else if(istype(I,/obj/item/weapon/weldingtool) && panel_open)
var/obj/item/weapon/weldingtool/W = I
if(W.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
to_chat(user, "<span class='notice'>You start slicing the floorweld off \the [src]...</span>")
if(do_after(user,20*I.toolspeed, target = src) && mode == SCREWS_OUT)
if(do_after(user,20*I.toolspeed, target = src) && panel_open)
if(!W.isOn())
return
to_chat(user, "<span class='notice'>You slice the floorweld off \the [src].</span>")
@@ -190,7 +189,7 @@
return
/obj/machinery/disposal/proc/flush()
flushing = 1
flushing = TRUE
flushAnimation()
sleep(10)
if(last_sound < world.time + 1)
@@ -204,8 +203,8 @@
H.init(src)
air_contents = new()
H.start(src)
flushing = 0
flush = 0
flushing = FALSE
flush = FALSE
/obj/machinery/disposal/proc/newHolderDestination(obj/structure/disposalholder/H)
for(var/obj/item/smallDelivery/O in src)
@@ -286,7 +285,7 @@
// handle machine interaction
/obj/machinery/disposal/bin/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
datum/tgui/master_ui = null, datum/ui_state/state = default_state)
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
if(stat & BROKEN)
return
if(user.loc == src)
@@ -300,7 +299,9 @@
/obj/machinery/disposal/bin/ui_data(mob/user)
var/list/data = list()
data["flush"] = flush
data["mode"] = mode
data["full_pressure"] = full_pressure
data["pressure_charging"] = pressure_charging
data["panel_open"] = panel_open
var/per = Clamp(100* air_contents.return_pressure() / (SEND_PRESSURE), 0, 100)
data["per"] = round(per, 1)
data["isai"] = isAI(user)
@@ -311,22 +312,22 @@
return
switch(action)
if("handle-0")
flush = 0
flush = FALSE
update_icon()
. = TRUE
if("handle-1")
if(mode != SCREWS_OUT)
flush = 1
if(!panel_open)
flush = TRUE
update_icon()
. = TRUE
if("pump-0")
if(mode == PRESSURE_ON)
mode = PRESSURE_OFF
if(pressure_charging)
pressure_charging = FALSE
update_icon()
. = TRUE
if("pump-1")
if(mode == PRESSURE_OFF)
mode = PRESSURE_ON
if(!pressure_charging)
pressure_charging = TRUE
update_icon()
. = TRUE
if("eject")
@@ -339,26 +340,26 @@
if(istype(I, /obj/item/projectile))
return
if(prob(75))
I.loc = src
visible_message("<span class='notice'>\the [I] lands in \the [src].</span>")
I.forceMove(src)
visible_message("<span class='notice'>[I] lands in [src].</span>")
update_icon()
else
visible_message("<span class='notice'>\the [I] bounces off of \the [src]'s rim!</span>")
visible_message("<span class='notice'>[I] bounces off of [src]'s rim!</span>")
return 0
else
return ..(mover, target, height)
/obj/machinery/disposal/bin/flush()
..()
if(mode == PRESSURE_MAXED)
mode = PRESSURE_ON
full_pressure = FALSE
pressure_charging = TRUE
update_icon()
/obj/machinery/disposal/bin/update_icon()
cut_overlays()
if(stat & BROKEN)
mode = PRESSURE_OFF
flush = 0
pressure_charging = FALSE
flush = FALSE
return
//flush handle
@@ -366,7 +367,7 @@
add_overlay(image('icons/obj/atmospherics/pipes/disposal.dmi', "dispover-handle"))
//only handle is shown if no power
if(stat & NOPOWER || mode == SCREWS_OUT)
if(stat & NOPOWER || panel_open)
return
//check for items in disposal - occupied light
@@ -374,9 +375,9 @@
add_overlay(image('icons/obj/atmospherics/pipes/disposal.dmi', "dispover-full"))
//charging and ready light
if(mode == PRESSURE_ON)
if(pressure_charging)
add_overlay(image('icons/obj/atmospherics/pipes/disposal.dmi', "dispover-charge"))
else if(mode == PRESSURE_MAXED)
else if(full_pressure)
add_overlay(image('icons/obj/atmospherics/pipes/disposal.dmi', "dispover-ready"))
//timed process
@@ -388,7 +389,7 @@
flush_count++
if(flush_count >= flush_every_ticks)
if(contents.len)
if(mode == PRESSURE_MAXED)
if(full_pressure)
spawn(0)
feedback_inc("disposal_auto_flush",1)
flush()
@@ -404,7 +405,7 @@
use_power(100) // base power usage
if(mode != PRESSURE_ON) // if off or ready, no need to charge
if(!pressure_charging) // if off or ready, no need to charge
return
// otherwise charge
@@ -426,7 +427,8 @@
//if full enough, switch to ready mode
if(air_contents.return_pressure() >= SEND_PRESSURE)
mode = PRESSURE_MAXED
full_pressure = TRUE
pressure_charging = FALSE
update_icon()
return
@@ -441,7 +443,7 @@
desc = "A chute for big and small packages alike!"
density = 1
icon_state = "intake"
mode = PRESSURE_OFF // the chute doesn't need charging and always works
pressure_charging = FALSE // the chute doesn't need charging and always works
/obj/machinery/disposal/deliveryChute/New(loc,var/obj/structure/disposalconstruct/make_from)
..()
+5 -5
View File
@@ -27,7 +27,7 @@
var/obj/item/device/destTagger/O = W
if(sortTag != O.currTag)
var/tag = uppertext(TAGGERLOCATIONS[O.currTag])
var/tag = uppertext(GLOB.TAGGERLOCATIONS[O.currTag])
to_chat(user, "<span class='notice'>*[tag]*</span>")
sortTag = O.currTag
playsound(loc, 'sound/machines/twobeep.ogg', 100, 1)
@@ -108,7 +108,7 @@
var/obj/item/device/destTagger/O = W
if(sortTag != O.currTag)
var/tag = uppertext(TAGGERLOCATIONS[O.currTag])
var/tag = uppertext(GLOB.TAGGERLOCATIONS[O.currTag])
to_chat(user, "<span class='notice'>*[tag]*</span>")
sortTag = O.currTag
playsound(loc, 'sound/machines/twobeep.ogg', 100, 1)
@@ -151,13 +151,13 @@
var/dat = "<tt><center><h1><b>TagMaster 2.2</b></h1></center>"
dat += "<table style='width:100%; padding:4px;'><tr>"
for (var/i = 1, i <= TAGGERLOCATIONS.len, i++)
dat += "<td><a href='?src=\ref[src];nextTag=[i]'>[TAGGERLOCATIONS[i]]</a></td>"
for (var/i = 1, i <= GLOB.TAGGERLOCATIONS.len, i++)
dat += "<td><a href='?src=\ref[src];nextTag=[i]'>[GLOB.TAGGERLOCATIONS[i]]</a></td>"
if(i%4==0)
dat += "</tr><tr>"
dat += "</tr></table><br>Current Selection: [currTag ? TAGGERLOCATIONS[currTag] : "None"]</tt>"
dat += "</tr></table><br>Current Selection: [currTag ? GLOB.TAGGERLOCATIONS[currTag] : "None"]</tt>"
user << browse(dat, "window=destTagScreen;size=450x350")
onclose(user, "destTagScreen")