Bleeding edgy refresh (#303)

* not code stuff

* other things

* global vars, defines, helpers

* onclick hud stuff, orphans, world.dm

* controllers and datums

* game folder

* everything not client/mobs in modules

* client folder

* stage 1 mob stuff

* simple animal things

* silicons

* carbon things

* ayylmaos and monkeys

* hyoomahn

* icons n shit

* sprite fixes

* compile fixes

* some fixes I cherrypicked.

* qdel fixes

* forgot brain refractors
This commit is contained in:
Poojawa
2017-03-21 11:44:10 -05:00
committed by GitHub
parent 099a6c8764
commit f67e9f6d87
1476 changed files with 344416 additions and 40694 deletions
@@ -49,7 +49,8 @@
icon = 'icons/effects/fire.dmi'
icon_state = "1"
layer = ABOVE_OPEN_TURF_LAYER
luminosity = 3
light_range = 3
light_color = LIGHT_COLOR_FIRE
var/volume = 125
var/temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
@@ -147,7 +148,7 @@
return 1
/obj/effect/hotspot/Destroy()
SetLuminosity(0)
set_light(0)
SSair.hotspots -= src
var/turf/open/T = loc
if(istype(T) && T.active_hotspot == src)
@@ -149,7 +149,7 @@ var/list/gaslist_cache = null
if(thermal_energy() > (PLASMA_BINDING_ENERGY*10))
if(cached_gases["plasma"] && cached_gases["co2"] && cached_gases["plasma"][MOLES] > MINIMUM_HEAT_CAPACITY && cached_gases["co2"][MOLES] > MINIMUM_HEAT_CAPACITY && (cached_gases["plasma"][MOLES]+cached_gases["co2"][MOLES])/total_moles() >= FUSION_PURITY_THRESHOLD)//Fusion wont occur if the level of impurities is too high.
//fusion converts plasma and co2 to o2 and n2 (exothermic)
//world << "pre [temperature, [cached_gases["plasma"][MOLES]], [cached_gases["co2"][MOLES]]
//to_chat(world, "pre [temperature, [cached_gases["plasma"][MOLES]], [cached_gases["co2"][MOLES]])
var/old_heat_capacity = heat_capacity()
var/carbon_efficency = min(cached_gases["plasma"][MOLES]/cached_gases["co2"][MOLES],MAX_CARBON_EFFICENCY)
var/reaction_energy = thermal_energy()
@@ -177,7 +177,7 @@ var/list/gaslist_cache = null
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
temperature = max(((temperature*old_heat_capacity + reaction_energy)/new_heat_capacity),TCMB)
//Prevents whatever mechanism is causing it to hit negative temperatures.
//world << "post [temperature], [cached_gases["plasma"][MOLES]], [cached_gases["co2"][MOLES]]
//to_chat(world, "post [temperature], [cached_gases["plasma"][MOLES]], [cached_gases["co2"][MOLES]])
*/
if(holder)
if(cached_gases["freon"])
@@ -192,10 +192,10 @@ var/list/gaslist_cache = null
fuel_burnt = 0
if(temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
//world << "pre [temperature], [cached_gases["o2"][MOLES]], [cached_gases["plasma"][MOLES]]"
//to_chat(world, "pre [temperature], [cached_gases["o2"][MOLES]], [cached_gases["plasma"][MOLES]]")
if(fire())
reacting = 1
//world << "post [temperature], [cached_gases["o2"][MOLES]], [cached_gases["plasma"][MOLES]]"
//to_chat(world, "post [temperature], [cached_gases["o2"][MOLES]], [cached_gases["plasma"][MOLES]]")
return reacting
+11 -11
View File
@@ -152,7 +152,7 @@
/obj/machinery/airalarm/ui_status(mob/user)
if(user.has_unlimited_silicon_privilege && aidisabled)
user << "AI control has been disabled."
to_chat(user, "AI control has been disabled.")
else if(!shorted)
return ..()
return UI_CLOSE
@@ -404,7 +404,7 @@
signal.data["sigtype"] = "command"
radio_connection.post_signal(src, signal, RADIO_FROM_AIRALARM)
// world << text("Signal [] Broadcasted to []", command, target)
// to_chat(world, text("Signal [] Broadcasted to []", command, target))
return 1
@@ -631,7 +631,7 @@
if(2)
if(istype(W, /obj/item/weapon/wirecutters) && panel_open && wires.is_all_cut())
playsound(src.loc, W.usesound, 50, 1)
user << "<span class='notice'>You cut the final wires.</span>"
to_chat(user, "<span class='notice'>You cut the final wires.</span>")
new /obj/item/stack/cable_coil(loc, 5)
buildstage = 1
update_icon()
@@ -639,18 +639,18 @@
else if(istype(W, /obj/item/weapon/screwdriver)) // Opening that Air Alarm up.
playsound(src.loc, W.usesound, 50, 1)
panel_open = !panel_open
user << "<span class='notice'>The wires have been [panel_open ? "exposed" : "unexposed"].</span>"
to_chat(user, "<span class='notice'>The wires have been [panel_open ? "exposed" : "unexposed"].</span>")
update_icon()
return
else if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))// trying to unlock the interface with an ID card
if(stat & (NOPOWER|BROKEN))
user << "<span class='warning'>It does nothing!</span>"
to_chat(user, "<span class='warning'>It does nothing!</span>")
else
if(src.allowed(usr) && !wires.is_cut(WIRE_IDSCAN))
locked = !locked
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] the air alarm interface.</span>"
to_chat(user, "<span class='notice'>You [ locked ? "lock" : "unlock"] the air alarm interface.</span>")
else
user << "<span class='danger'>Access denied.</span>"
to_chat(user, "<span class='danger'>Access denied.</span>")
return
else if(panel_open && is_wire_tool(W))
wires.interact(user)
@@ -672,14 +672,14 @@
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/cable = W
if(cable.get_amount() < 5)
user << "<span class='warning'>You need five lengths of cable to wire the fire alarm!</span>"
to_chat(user, "<span class='warning'>You need five lengths of cable to wire the fire alarm!</span>")
return
user.visible_message("[user.name] wires the air alarm.", \
"<span class='notice'>You start wiring the air alarm...</span>")
if (do_after(user, 20, target = src))
if (cable.get_amount() >= 5 && buildstage == 1)
cable.use(5)
user << "<span class='notice'>You wire the air alarm.</span>"
to_chat(user, "<span class='notice'>You wire the air alarm.</span>")
wires.repair()
aidisabled = 0
locked = 1
@@ -692,14 +692,14 @@
if(0)
if(istype(W, /obj/item/weapon/electronics/airalarm))
if(user.temporarilyRemoveItemFromInventory(W))
user << "<span class='notice'>You insert the circuit.</span>"
to_chat(user, "<span class='notice'>You insert the circuit.</span>")
buildstage = 1
update_icon()
qdel(W)
return
if(istype(W, /obj/item/weapon/wrench))
user << "<span class='notice'>You detach \the [src] from the wall.</span>"
to_chat(user, "<span class='notice'>You detach \the [src] from the wall.</span>")
playsound(src.loc, W.usesound, 50, 1)
new /obj/item/wallframe/airalarm( user.loc )
qdel(src)
@@ -127,7 +127,7 @@ Pipelines + Other Objects -> Pipe network
if(can_unwrench(user))
var/turf/T = get_turf(src)
if (level==1 && isturf(T) && T.intact)
user << "<span class='warning'>You must remove the plating first!</span>"
to_chat(user, "<span class='warning'>You must remove the plating first!</span>")
return 1
var/datum/gas_mixture/int_air = return_air()
var/datum/gas_mixture/env_air = loc.return_air()
@@ -137,9 +137,9 @@ Pipelines + Other Objects -> Pipe network
var/internal_pressure = int_air.return_pressure()-env_air.return_pressure()
playsound(src.loc, W.usesound, 50, 1)
user << "<span class='notice'>You begin to unfasten \the [src]...</span>"
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if (internal_pressure > 2*ONE_ATMOSPHERE)
user << "<span class='warning'>As you begin unwrenching \the [src] a gush of air blows in your face... maybe you should reconsider?</span>"
to_chat(user, "<span class='warning'>As you begin unwrenching \the [src] a gush of air blows in your face... maybe you should reconsider?</span>")
unsafe_wrenching = TRUE //Oh dear oh dear
if (do_after(user, 20*W.toolspeed, target = src) && !QDELETED(src))
@@ -40,7 +40,7 @@
last_pressure_delta = pressure_delta
//world << "pressure_delta = [pressure_delta]; transfer_moles = [transfer_moles];"
//to_chat(world, "pressure_delta = [pressure_delta]; transfer_moles = [transfer_moles];")
//Actually transfer the gas
var/datum/gas_mixture/removed = air2.remove(transfer_moles)
@@ -169,7 +169,7 @@ Passive gate is similar to the regular pump except:
/obj/machinery/atmospherics/components/binary/passive_gate/can_unwrench(mob/user)
if(..())
if(on)
user << "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>"
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>")
else
return 1
@@ -184,7 +184,7 @@ Thus, the two variables affect pump operation are set in New():
var/turf/T = get_turf(src)
var/area/A = get_area(src)
if(!(stat & NOPOWER) && on)
user << "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>"
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>")
else
investigate_log("Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [A]", "atmos")
message_admins("Pump, [src.name], was unwrenched by [ADMIN_LOOKUPFLW(user)] at [ADMIN_COORDJMP(T)]")
@@ -181,7 +181,7 @@ Thus, the two variables affect pump operation are set in New():
var/turf/T = get_turf(src)
//var/area/A = get_area(src)
if(!(stat & NOPOWER) && on)
user << "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>"
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>")
else
investigate_log("Volume Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [loc.loc]", "atmos")
message_admins("Volume Pump, [src.name], was unwrenched by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)]")
@@ -167,6 +167,6 @@ UI Stuff
/obj/machinery/atmospherics/components/ui_status(mob/user)
if(allowed(user))
return ..()
user << "<span class='danger'>Access denied.</span>"
to_chat(user, "<span class='danger'>Access denied.</span>")
return UI_CLOSE
@@ -232,7 +232,7 @@
return occupant
/obj/machinery/atmospherics/components/unary/cryo_cell/container_resist(mob/living/user)
user << "<span class='notice'>You struggle inside the cryotube, kicking the release with your foot... (This will take around 30 seconds.)</span>"
to_chat(user, "<span class='notice'>You struggle inside the cryotube, kicking the release with your foot... (This will take around 30 seconds.)</span>")
audible_message("<span class='notice'>You hear a thump from [src].</span>")
if(do_after(user, 300))
if(occupant == user) // Check they're still here.
@@ -242,11 +242,11 @@
..()
if(occupant)
if(on)
user << "Someone's inside [src]!"
to_chat(user, "[occupant] is inside [src]!")
else
user << "You can barely make out a form floating in [src]."
to_chat(user, "You can barely make out a form floating in [src].")
else
user << "[src] seems empty."
to_chat(user, "[src] seems empty.")
/obj/machinery/atmospherics/components/unary/cryo_cell/MouseDrop_T(mob/target, mob/user)
if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser())
@@ -257,7 +257,7 @@
if(istype(I, /obj/item/weapon/reagent_containers/glass))
. = 1 //no afterattack
if(beaker)
user << "<span class='warning'>A beaker is already loaded into [src]!</span>"
to_chat(user, "<span class='warning'>A beaker is already loaded into [src]!</span>")
return
if(!user.drop_item())
return
@@ -30,7 +30,7 @@
/obj/machinery/atmospherics/components/unary/portables_connector/can_unwrench(mob/user)
if(..())
if(connected_device)
user << "<span class='warning'>You cannot unwrench this [src], detach [connected_device] first!</span>"
to_chat(user, "<span class='warning'>You cannot unwrench this [src], detach [connected_device] first!</span>")
else
return 1
@@ -57,7 +57,7 @@
newtype = heater
name = initial(newtype.name)
build_path = initial(newtype.build_path)
user << "<span class='notice'>You change the circuitboard setting to \"[new_setting]\".</span>"
to_chat(user, "<span class='notice'>You change the circuitboard setting to \"[new_setting]\".</span>")
else
return ..()
@@ -248,7 +248,7 @@
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user))
playsound(loc, WT.usesound, 40, 1)
user << "<span class='notice'>You begin welding the vent...</span>"
to_chat(user, "<span class='notice'>You begin welding the vent...</span>")
if(do_after(user, 20*W.toolspeed, target = src))
if(!src || !WT.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
@@ -268,14 +268,14 @@
/obj/machinery/atmospherics/components/unary/vent_pump/can_unwrench(mob/user)
if(..())
if(!(stat & NOPOWER) && on)
user << "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>"
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>")
else
return 1
/obj/machinery/atmospherics/components/unary/vent_pump/examine(mob/user)
..()
if(welded)
user << "It seems welded shut."
to_chat(user, "It seems welded shut.")
/obj/machinery/atmospherics/components/unary/vent_pump/power_change()
..()
@@ -340,7 +340,7 @@
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0,user))
playsound(loc, WT.usesound, 40, 1)
user << "<span class='notice'>Now welding the scrubber.</span>"
to_chat(user, "<span class='notice'>Now welding the scrubber.</span>")
if(do_after(user, 20*W.toolspeed, target = src))
if(!src || !WT.isOn())
return
@@ -361,7 +361,7 @@
/obj/machinery/atmospherics/components/unary/vent_scrubber/can_unwrench(mob/user)
if(..())
if (!(stat & NOPOWER) && on)
user << "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>"
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first!</span>")
else
return 1
@@ -94,13 +94,13 @@
/obj/machinery/meter/examine(mob/user)
..()
user << status()
to_chat(user, status())
/obj/machinery/meter/attackby(obj/item/weapon/W, mob/user, params)
if (istype(W, /obj/item/weapon/wrench))
playsound(src.loc, W.usesound, 50, 1)
user << "<span class='notice'>You begin to unfasten \the [src]...</span>"
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if (do_after(user, 40*W.toolspeed, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
@@ -122,7 +122,7 @@
if(stat & (NOPOWER|BROKEN))
return 1
else
usr << status()
to_chat(usr, status())
return 1
/obj/machinery/meter/singularity_pull(S, current_size)
@@ -204,11 +204,11 @@
if(!WT.remove_fuel(0, user))
return
playsound(loc, WT.usesound, 40, 1)
user << "<span class='notice'>You begin cutting [src] apart...</span>"
to_chat(user, "<span class='notice'>You begin cutting [src] apart...</span>")
if(do_after(user, 30, target = src))
deconstruct(TRUE)
else
user << "<span class='notice'>You cannot slice [src] apart when it isn't broken.</span>"
to_chat(user, "<span class='notice'>You cannot slice [src] apart when it isn't broken.</span>")
return 1
else
return ..()
@@ -101,10 +101,10 @@
else
var/obj/machinery/atmospherics/components/unary/portables_connector/possible_port = locate(/obj/machinery/atmospherics/components/unary/portables_connector) in loc
if(!possible_port)
user << "<span class='notice'>Nothing happens.</span>"
to_chat(user, "<span class='notice'>Nothing happens.</span>")
return
if(!connect(possible_port))
user << "<span class='notice'>[name] failed to connect to the port.</span>"
to_chat(user, "<span class='notice'>[name] failed to connect to the port.</span>")
return
playsound(src.loc, W.usesound, 50, 1)
user.visible_message( \
@@ -15,7 +15,7 @@
volume = 1000
/obj/machinery/portable_atmospherics/pump/New()
/obj/machinery/portable_atmospherics/pump/Initialize()
..()
pump = new(src, FALSE)
pump.on = TRUE