Merge remote-tracking branch 'upstream/dev' into new_tables

This commit is contained in:
GinjaNinja32
2015-05-13 20:46:58 +01:00
18 changed files with 511 additions and 538 deletions

View File

@@ -108,7 +108,6 @@
#include "code\controllers\Processes\nanoui.dm"
#include "code\controllers\Processes\obj.dm"
#include "code\controllers\Processes\pipenet.dm"
#include "code\controllers\Processes\powernet.dm"
#include "code\controllers\Processes\Shuttle.dm"
#include "code\controllers\Processes\sun.dm"
#include "code\controllers\Processes\supply.dm"

View File

@@ -14,10 +14,6 @@
machines = dd_sortedObjectList(machines)
/datum/controller/process/machinery/proc/internal_process()
//#ifdef PROFILE_MACHINES
//machine_profiling.len = 0
//#endif
for(var/obj/machinery/M in machines)
if(M && !M.gcDestroyed)
#ifdef PROFILE_MACHINES
@@ -43,6 +39,20 @@
scheck()
for(var/datum/powernet/powerNetwork in powernets)
if(istype(powerNetwork) && !powerNetwork.disposed)
powerNetwork.reset()
scheck()
continue
powernets.Remove(powerNetwork)
// Currently only used by powersinks. These items get priority processed before machinery
for(var/obj/item/I in processing_power_items)
if(!I.pwr_drain()) // 0 = Process Kill, remove from processing list.
processing_power_items.Remove(I)
scheck()
/datum/controller/process/machinery/getStatName()
return ..()+"([machines.len])"

View File

@@ -1,20 +0,0 @@
/datum/controller/process/powernet/setup()
name = "powernet"
schedule_interval = 20 // every 2 seconds
/datum/controller/process/powernet/doWork()
for(var/datum/powernet/powerNetwork in powernets)
if(istype(powerNetwork) && !powerNetwork.disposed)
powerNetwork.reset()
scheck()
continue
powernets.Remove(powerNetwork)
// This is necessary to ensure powersinks are always the first devices that drain power from powernet.
// Otherwise APCs or other stuff go first, resulting in bad things happening.
for(var/obj/item/device/powersink/S in processing_objects)
S.drain()
/datum/controller/process/powernet/getStatName()
return ..()+"([powernets.len])"

View File

@@ -345,11 +345,17 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/weedcontrol
name = "Weed control crate"
contains = list(/obj/item/weapon/scythe,
contains = list(/obj/item/weapon/hatchet,
/obj/item/weapon/hatchet,
/obj/item/weapon/reagent_containers/spray/plantbgone,
/obj/item/weapon/reagent_containers/spray/plantbgone,
/obj/item/weapon/reagent_containers/spray/plantbgone,
/obj/item/weapon/reagent_containers/spray/plantbgone,
/obj/item/clothing/mask/gas,
/obj/item/clothing/mask/gas,
/obj/item/weapon/grenade/chem_grenade/antiweed,
/obj/item/weapon/grenade/chem_grenade/antiweed)
cost = 20
cost = 25
containertype = /obj/structure/closet/crate/secure/hydrosec
containername = "Weed control crate"
access = access_hydroponics

View File

@@ -22,7 +22,7 @@
/obj/machinery/portable_atmospherics/powered/pump/New()
..()
cell = new/obj/item/weapon/cell(src)
cell = new/obj/item/weapon/cell/apc(src)
var/list/air_mix = StandardAirMix()
src.air_contents.adjust_multi("oxygen", air_mix["oxygen"], "nitrogen", air_mix["nitrogen"])
@@ -78,7 +78,7 @@
output_volume = environment.volume * environment.group_multiplier
air_temperature = environment.temperature? environment.temperature : air_contents.temperature
else
pressure_delta = target_pressure - air_contents.return_pressure()
pressure_delta = environment.return_pressure() - target_pressure
output_volume = air_contents.volume * air_contents.group_multiplier
air_temperature = air_contents.temperature? air_contents.temperature : environment.temperature

View File

@@ -20,7 +20,7 @@
/obj/machinery/portable_atmospherics/powered/scrubber/New()
..()
cell = new/obj/item/weapon/cell(src)
cell = new/obj/item/weapon/cell/apc(src)
/obj/machinery/portable_atmospherics/powered/scrubber/emp_act(severity)
if(stat & (BROKEN|NOPOWER))

View File

@@ -7,7 +7,7 @@
min_force = 4
hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 150 //If you change this, consiter changing ../door/window/brigdoor/ health at the bottom of this .dm file
health
health = 150
visible = 0.0
use_power = 0
flags = ON_BORDER
@@ -249,13 +249,14 @@
/obj/machinery/door/window/brigdoor
name = "Secure Door"
name = "secure door"
icon = 'icons/obj/doors/windoor.dmi'
icon_state = "leftsecure"
base_state = "leftsecure"
req_access = list(access_security)
var/id = null
health = 300.0 //Stronger doors for prison (regular window door health is 200)
maxhealth = 300
health = 300.0 //Stronger doors for prison (regular window door health is 150)
/obj/machinery/door/window/northleft

View File

@@ -106,7 +106,6 @@
if(loc)
loc.Exited(src)
loc = null
if(prob(30))
explosion(get_turf(loc), 0, 0, 1, 3)
@@ -460,6 +459,8 @@
/obj/mecha/proc/setInternalDamage(int_dam_flag)
if(!pr_internal_damage) return
internal_damage |= int_dam_flag
pr_internal_damage.start()
log_append_to_last("Internal damage of type [int_dam_flag].",1)

View File

@@ -269,7 +269,7 @@ var/list/global/slot_flags_enumeration = list(
if(!M) return 0
if(!ishuman(M)) return 0
var/mob/living/carbon/human/H = M
var/list/mob_equip = list()
if(H.species.hud && H.species.hud.equip_slots)
@@ -277,22 +277,22 @@ var/list/global/slot_flags_enumeration = list(
if(H.species && !(slot in mob_equip))
return 0
//First check if the item can be equipped to the desired slot.
if("[slot]" in slot_flags_enumeration)
var/req_flags = slot_flags_enumeration["[slot]"]
if(!(req_flags & slot_flags))
return 0
//Next check that the slot is free
if(H.get_equipped_item(slot))
return 0
//Next check if the slot is accessible.
var/mob/_user = disable_warning? null : H
if(!H.slot_is_accessible(slot, src, _user))
return 0
//Lastly, check special rules for the desired slot.
switch(slot)
if(slot_l_ear, slot_r_ear)
@@ -355,7 +355,7 @@ var/list/global/slot_flags_enumeration = list(
/obj/item/proc/mob_can_unequip(mob/M, slot, disable_warning = 0)
if(!slot) return 0
if(!M) return 0
if(!canremove)
return 0
if(!M.slot_is_accessible(slot, src, disable_warning? null : M))
@@ -601,3 +601,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
usr.visible_message("[zoomdevicename ? "[usr] looks up from the [src.name]" : "[usr] lowers the [src.name]"].")
return
/obj/item/proc/pwr_drain()
return 0 // Process Kill

View File

@@ -27,6 +27,7 @@
/obj/item/device/powersink/Destroy()
processing_objects.Remove(src)
processing_power_items.Remove(src)
..()
/obj/item/device/powersink/attackby(var/obj/item/I, var/mob/user)
@@ -49,6 +50,7 @@
else
if (mode == 2)
processing_objects.Remove(src) // Now the power sink actually stops draining the station's power if you unhook it. --NeoFite
processing_power_items.Remove(src)
anchored = 0
mode = 0
src.visible_message("<span class='notice'>[user] detaches [src] from the cable!</span>")
@@ -71,25 +73,27 @@
mode = 2
icon_state = "powersink1"
processing_objects.Add(src)
processing_power_items.Add(src)
if(2) //This switch option wasn't originally included. It exists now. --NeoFite
src.visible_message("<span class='notice'>[user] deactivates [src]!</span>")
mode = 1
set_light(0)
icon_state = "powersink0"
processing_objects.Remove(src)
processing_power_items.Remove(src)
/obj/item/device/powersink/proc/drain()
/obj/item/device/powersink/pwr_drain()
if(!attached)
return
return 0
if(drained_this_tick)
return
return 1
drained_this_tick = 1
var/drained = 0
if(!PN)
return
return 1
set_light(12)
PN.trigger_warning()
@@ -110,6 +114,7 @@
A.cell.use(drain_val * CELLRATE)
drained += drain_val
power_drained += drained
return 1
/obj/item/device/powersink/process()

View File

@@ -8,6 +8,7 @@ var/global/obj/effect/datacore/data_core = null
var/global/list/all_areas = list()
var/global/list/machines = list()
var/global/list/processing_objects = list()
var/global/list/processing_power_items = list()
var/global/list/active_diseases = list()
var/global/list/med_hud_users = list() // List of all entities using a medical HUD.
var/global/list/sec_hud_users = list() // List of all entities using a security HUD.

View File

@@ -226,7 +226,7 @@
icon_state = "hatchet"
flags = CONDUCT
force = 12.0
w_class = 3.0
w_class = 2
throwforce = 15.0
throw_speed = 4
throw_range = 4
@@ -270,11 +270,3 @@
slot_flags = SLOT_BACK
origin_tech = "materials=2;combat=2"
attack_verb = list("chopped", "sliced", "cut", "reaped")
/obj/item/weapon/scythe/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
if(istype(A, /obj/effect/plant))
for(var/obj/effect/plant/B in orange(A,1))
if(prob(80))
B.die_off(1)
qdel(A)

View File

@@ -118,7 +118,7 @@
var/list/L = hearers(src, dist)
for (var/obj/mecha/M in mechas_list)
if (get_dist(src, M) <= dist)
if (M.z == src.z && get_dist(src, M) <= dist)
L += M
return L

View File

@@ -0,0 +1,5 @@
author: PsiOmegaDelta
delete-after: True
changes:
- maptweak: "Should now be more evident that the brig disposal chute sends its goods to the common brig area."

View File

@@ -0,0 +1,4 @@
author: Techhead
delete-after: True
changes:
- bugfix: "Portable air pumps now fill based on external/airtank pressure when pumping in."

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,7 @@
<!--
Title: Alarm Monitor Console (Main content)
Used In File(s): \code\modules\nano\modules\alarm_monitor.dm
"MD5 checks should be good enough"
-->
{{for data.categories}}
@@ -34,4 +35,4 @@ Used In File(s): \code\modules\nano\modules\alarm_monitor.dm
{{empty}}
<span class="white">--All Systems Nominal</span>
{{/for}}
{{/for}}
{{/for}}

View File

@@ -1,37 +0,0 @@
<!--
Title: Alarm Monitor Console (Main content)
Used In File(s): \code\modules\nano\modules\alarm_monitor.dm
-->
{{for data.categories}}
<H2><span class="itemLabelWidest">{{:value.category}}</span></H2>
{{for value.alarms :alarmValue:alarmIndex}}
{{if alarmValue.origin_lost}}
{{:alarmValue.name}} <span class='notice'>Alarm Origin Lost</span><br>
{{else}}
{{:alarmValue.name}}<br>
{{/if}}
{{if alarmValue.has_cameras || alarmValue.lost_sources != ""}}
<div class="item">
{{if alarmValue.has_cameras}}
<div class="itemContent" style="width: 100%;">
{{for alarmValue.cameras :cameraValue:cameraIndex}}
{{if cameraValue.deact}}
{{:helper.link(cameraValue.name + " (deactivated)", '', {}, 'inactive')}}
{{else}}
{{:helper.link(cameraValue.name, '', {'switchTo' : cameraValue.camera})}}
{{/if}}
{{/for}}
</div>
{{/if}}
{{if alarmValue.lost_sources != ""}}
<div class="itemContent" style="width: 100%;">
<H4><span class='notice'>Lost Alarm Sources: {{:alarmValue.lost_sources}}</span></H4>
</div>
{{/if}}
</div>
{{/if}}
{{empty}}
<span class="white">--All Systems Nominal</span>
{{/for}}
{{/for}}