Merge remote-tracking branch 'upstream/master' into dev-freeze

Conflicts:
	code/game/objects/structures/girders.dm
	code/modules/mob/living/carbon/human/human_damage.dm
This commit is contained in:
PsiOmegaDelta
2015-08-24 10:23:12 +02:00
33 changed files with 826 additions and 817 deletions

View File

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

View File

@@ -6,6 +6,7 @@
/datum/controller/process/machinery/doWork() /datum/controller/process/machinery/doWork()
internal_sort() internal_sort()
internal_process_pipenets()
internal_process_machinery() internal_process_machinery()
internal_process_power() internal_process_power()
internal_process_power_drain() internal_process_power_drain()
@@ -57,6 +58,14 @@
processing_power_items.Remove(I) processing_power_items.Remove(I)
scheck() scheck()
/datum/controller/process/machinery/proc/internal_process_pipenets()
for(var/datum/pipe_network/pipeNetwork in pipe_networks)
if(istype(pipeNetwork) && !pipeNetwork.disposed)
pipeNetwork.process()
scheck()
continue
pipe_networks.Remove(pipeNetwork)
/datum/controller/process/machinery/getStatName() /datum/controller/process/machinery/getStatName()
return ..()+"([machines.len])" return ..()+"(MCH:[machines.len] PWR:[powernets.len] PIP:[pipe_networks.len])"

View File

@@ -1,15 +0,0 @@
/datum/controller/process/pipenet/setup()
name = "pipenet"
schedule_interval = 20 // every 2 seconds
/datum/controller/process/pipenet/doWork()
for(var/datum/pipe_network/pipeNetwork in pipe_networks)
if(istype(pipeNetwork) && !pipeNetwork.disposed)
pipeNetwork.process()
scheck()
continue
pipe_networks.Remove(pipeNetwork)
/datum/controller/process/pipenet/getStatName()
return ..()+"([pipe_networks.len])"

View File

@@ -111,7 +111,6 @@
return 0 return 0
//Grab candidates randomly until we have enough. //Grab candidates randomly until we have enough.
candidates = shuffle(candidates)
while(candidates.len && pending_antagonists.len < cur_max) while(candidates.len && pending_antagonists.len < cur_max)
var/datum/mind/player = pick(candidates) var/datum/mind/player = pick(candidates)
candidates -= player candidates -= player
@@ -121,11 +120,18 @@
/datum/antagonist/proc/draft_antagonist(var/datum/mind/player) /datum/antagonist/proc/draft_antagonist(var/datum/mind/player)
//Check if the player can join in this antag role, or if the player has already been given an antag role. //Check if the player can join in this antag role, or if the player has already been given an antag role.
if(!can_become_antag(player) || player.special_role) if(!can_become_antag(player))
log_debug("[player.key] was selected for [role_text] by lottery, but is not allowed to be that role.") log_debug("[player.key] was selected for [role_text] by lottery, but is not allowed to be that role.")
return 0 return 0
if(player.special_role)
log_debug("[player.key] was selected for [role_text] by lottery, but they already have a special role.")
return 0
if(!(flags & ANTAG_OVERRIDE_JOB) && (!player.current || istype(player.current, /mob/new_player)))
log_debug("[player.key] was selected for [role_text] by lottery, but they have not joined the game.")
return 0
pending_antagonists |= player pending_antagonists |= player
log_debug("[player.key] has been selected for [role_text] by lottery.")
//Ensure that antags with ANTAG_OVERRIDE_JOB do not occupy job slots. //Ensure that antags with ANTAG_OVERRIDE_JOB do not occupy job slots.
if(flags & ANTAG_OVERRIDE_JOB) if(flags & ANTAG_OVERRIDE_JOB)

View File

@@ -104,8 +104,8 @@ var/datum/antagonist/cultist/cult
player.current.visible_message("<FONT size = 3>[player.current] looks like they just reverted to their old faith!</FONT>") player.current.visible_message("<FONT size = 3>[player.current] looks like they just reverted to their old faith!</FONT>")
/datum/antagonist/cultist/add_antagonist(var/datum/mind/player) /datum/antagonist/cultist/add_antagonist(var/datum/mind/player)
if(!..()) . = ..()
return if(.)
player << "You catch a glimpse of the Realm of Nar-Sie, the Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of That Which Waits. Assist your new compatriots in their dark dealings. Their goals are yours, and yours are theirs. You serve the Dark One above all else. Bring It back." player << "You catch a glimpse of the Realm of Nar-Sie, the Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of That Which Waits. Assist your new compatriots in their dark dealings. Their goals are yours, and yours are theirs. You serve the Dark One above all else. Bring It back."
/datum/antagonist/cultist/can_become_antag(var/datum/mind/player) /datum/antagonist/cultist/can_become_antag(var/datum/mind/player)

View File

@@ -86,7 +86,7 @@
department = "Security" department = "Security"
department_flag = ENGSEC department_flag = ENGSEC
faction = "Station" faction = "Station"
total_positions = 2 total_positions = 1
spawn_positions = 2 spawn_positions = 2
supervisors = "the head of security" supervisors = "the head of security"
selection_color = "#ffeeee" selection_color = "#ffeeee"
@@ -129,8 +129,8 @@
department = "Security" department = "Security"
department_flag = ENGSEC department_flag = ENGSEC
faction = "Station" faction = "Station"
total_positions = 3 total_positions = 4
spawn_positions = 3 spawn_positions = 4
supervisors = "the head of security" supervisors = "the head of security"
selection_color = "#ffeeee" selection_color = "#ffeeee"
access = list(access_security, access_eva, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue, access_external_airlocks) access = list(access_security, access_eva, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue, access_external_airlocks)

View File

@@ -20,10 +20,10 @@
/obj/machinery/cablelayer/attack_hand(mob/user as mob) /obj/machinery/cablelayer/attack_hand(mob/user as mob)
if(!cable&&!on) if(!cable&&!on)
user << "\The [src] don't work with no cable." user << "<span class='warning'>\The [src] doesn't have any cable loaded.</span>"
return return
on=!on on=!on
user.visible_message("\The [src] [!on?"dea":"a"]ctivated.", "[user] [!on?"dea":"a"]ctivated \the [src].") user.visible_message("\The [user] [!on?"dea":"a"]ctivates \the [src].", "You switch [src] [on? "on" : "off"]")
return return
/obj/machinery/cablelayer/attackby(var/obj/item/O as obj, var/mob/user as mob) /obj/machinery/cablelayer/attackby(var/obj/item/O as obj, var/mob/user as mob)
@@ -31,26 +31,27 @@
var/result = load_cable(O) var/result = load_cable(O)
if(!result) if(!result)
user << "Reel is full." user << "<span class='warning'>\The [src]'s cable reel is full.</span>"
else else
user << "[result] meters of cable successfully loaded." user << "You load [result] lengths of cable into [src]."
return return
if(istype(O, /obj/item/weapon/screwdriver)) if(istype(O, /obj/item/weapon/wirecutters))
if(cable && cable.amount) if(cable && cable.amount)
var/m = round(input(usr,"Please specify the length of cable to cut","Cut cable",min(cable.amount,30)) as num, 1) var/m = round(input(usr,"Please specify the length of cable to cut","Cut cable",min(cable.amount,30)) as num, 1)
m = min(m, cable.amount) m = min(m, cable.amount)
m = min(m, 30) m = min(m, 30)
if(m) if(m)
playsound(loc, 'sound/items/Wirecutter.ogg', 50, 1)
use_cable(m) use_cable(m)
var/obj/item/stack/cable_coil/CC = new (get_turf(src)) var/obj/item/stack/cable_coil/CC = new (get_turf(src))
CC.amount = m CC.amount = m
else else
usr << "There's no more cable on the reel." usr << "<span class='warning'>There's no more cable on the reel.</span>"
/obj/machinery/cablelayer/examine(mob/user) /obj/machinery/cablelayer/examine(mob/user)
..() ..()
user << "\The [src] has [cable.amount] meter\s." user << "\The [src]'s cable reel has [cable.amount] length\s left."
/obj/machinery/cablelayer/proc/load_cable(var/obj/item/stack/cable_coil/CC) /obj/machinery/cablelayer/proc/load_cable(var/obj/item/stack/cable_coil/CC)
if(istype(CC) && CC.amount) if(istype(CC) && CC.amount)
@@ -70,12 +71,11 @@
/obj/machinery/cablelayer/proc/use_cable(amount) /obj/machinery/cablelayer/proc/use_cable(amount)
if(!cable || cable.amount<1) if(!cable || cable.amount<1)
visible_message("Cable depleted, [src] deactivated.") visible_message("A red light flashes on \the [src].")
return return
/* if(cable.amount < amount)
visible_message("No enough cable to finish the task.")
return*/
cable.use(amount) cable.use(amount)
if(deleted(cable))
cable = null
return 1 return 1
/obj/machinery/cablelayer/proc/reset() /obj/machinery/cablelayer/proc/reset()

View File

@@ -254,6 +254,7 @@
health = between(health, health + repairing.amount*DOOR_REPAIR_AMOUNT, maxhealth) health = between(health, health + repairing.amount*DOOR_REPAIR_AMOUNT, maxhealth)
update_icon() update_icon()
qdel(repairing) qdel(repairing)
repairing = null
return return
if(repairing && istype(I, /obj/item/weapon/crowbar)) if(repairing && istype(I, /obj/item/weapon/crowbar))

View File

@@ -20,7 +20,7 @@
icon_state = "[initial(icon_state)]-on" icon_state = "[initial(icon_state)]-on"
set_light(brightness_on) set_light(brightness_on)
else else
icon_state = initial(icon_state) icon_state = "[initial(icon_state)]"
set_light(0) set_light(0)
/obj/item/device/flashlight/proc/update_brightness(var/mob/user = null) /obj/item/device/flashlight/proc/update_brightness(var/mob/user = null)

View File

@@ -33,12 +33,12 @@ obj/item/device/hailer/attack_self(mob/living/carbon/user as mob)
if(isnull(insults)) if(isnull(insults))
playsound(get_turf(src), 'sound/voice/halt.ogg', 100, 1, vary = 0) playsound(get_turf(src), 'sound/voice/halt.ogg', 100, 1, vary = 0)
user.show_message("<span class='warning'>[user]'s [name] rasps, \"[use_message]\"</span>",1) user.audible_message("<span class='warning'>[user]'s [name] rasps, \"[use_message]\"</span>", "<span class='warning'>\The [user] holds up \the [name].</span>")
else else
if(insults > 0) if(insults > 0)
playsound(get_turf(src), 'sound/voice/binsult.ogg', 100, 1, vary = 0) playsound(get_turf(src), 'sound/voice/binsult.ogg', 100, 1, vary = 0)
// Yes, it used to show the transcription of the sound clip. That was a) inaccurate b) immature as shit. // Yes, it used to show the transcription of the sound clip. That was a) inaccurate b) immature as shit.
user.show_message("<span class='warning'>[user]'s [name] gurgles something indecipherable and deeply offensive.</span>") user.audible_message("<span class='warning'>[user]'s [name] gurgles something indecipherable and deeply offensive.</span>", "<span class='warning'>\The [user] holds up \the [name].</span>")
insults-- insults--
else else
user << "<span class='danger'>*BZZZZZZZZT*</span>" user << "<span class='danger'>*BZZZZZZZZT*</span>"

View File

@@ -184,11 +184,9 @@
if(!uses_charge) if(!uses_charge)
amount -= used amount -= used
if (amount <= 0) if (amount <= 0)
spawn(0) //delete the empty stack once the current context yields
if (amount <= 0) //check again in case someone transferred stuff to us
if(usr) if(usr)
usr.remove_from_mob(src) usr.remove_from_mob(src)
qdel(src) qdel(src) //should be safe to qdel immediately since if someone is still using this stack it will persist for a little while longer
return 1 return 1
else else
if(get_amount() < used) if(get_amount() < used)

View File

@@ -215,6 +215,7 @@
if(istype(W, /obj/item/weapon/grab)) if(istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W var/obj/item/weapon/grab/G = W
src.MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet src.MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
return 0
if(istype(W,/obj/item/tk_grab)) if(istype(W,/obj/item/tk_grab))
return 0 return 0
if(istype(W, /obj/item/weapon/weldingtool)) if(istype(W, /obj/item/weapon/weldingtool))
@@ -262,11 +263,9 @@
return return
if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis) if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis)
return return
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src))) if((!( istype(O, /atom/movable) ) || O.anchored || !Adjacent(user) || !Adjacent(O) || !user.Adjacent(O) || user.contents.Find(src)))
return return
if(user.loc==null) // just in case someone manages to get a closet into the blue light dimension, as unlikely as that seems if(!isturf(user.loc)) // are you in a container/closet/pod/etc?
return
if(!istype(user.loc, /turf)) // are you in a container/closet/pod/etc?
return return
if(!src.opened) if(!src.opened)
return return

View File

@@ -7,6 +7,7 @@
var/health = 200 var/health = 200
var/cover = 50 //how much cover the girder provides against projectiles. var/cover = 50 //how much cover the girder provides against projectiles.
var/material/reinf_material var/material/reinf_material
var/reinforcing = 0
/obj/structure/girder/displaced /obj/structure/girder/displaced
icon_state = "displaced" icon_state = "displaced"
@@ -48,6 +49,7 @@
health = min(health,initial(health)) health = min(health,initial(health))
state = 0 state = 0
icon_state = initial(icon_state) icon_state = initial(icon_state)
reinforcing = 0
if(reinf_material) if(reinf_material)
reinforce_girder() reinforce_girder()
@@ -78,13 +80,18 @@
user << "<span class='notice'>You drill through the girder!</span>" user << "<span class='notice'>You drill through the girder!</span>"
dismantle() dismantle()
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2) else if(istype(W, /obj/item/weapon/screwdriver))
if(state == 2)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1) playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user << "<span class='notice'>Now unsecuring support struts...</span>" user << "<span class='notice'>Now unsecuring support struts...</span>"
if(do_after(user,40)) if(do_after(user,40))
if(!src) return if(!src) return
user << "<span class='notice'>You unsecured the support struts!</span>" user << "<span class='notice'>You unsecured the support struts!</span>"
state = 1 state = 1
else if(anchored && !reinf_material)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
reinforcing = !reinforcing
user << "<span class='notice'>\The [src] can now be [reinforcing? "reinforced" : "constructed"]!</span>"
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1) else if(istype(W, /obj/item/weapon/wirecutters) && state == 1)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
@@ -108,26 +115,36 @@
cover = 25 cover = 25
else if(istype(W, /obj/item/stack/material)) else if(istype(W, /obj/item/stack/material))
if(reinforcing && !reinf_material)
if(!reinforce_with_material(W, user))
return ..()
else
if(!construct_wall(W, user))
return ..()
var/obj/item/stack/S = W else
return ..()
/obj/structure/girder/proc/construct_wall(obj/item/stack/material/S, mob/user)
if(S.get_amount() < 2) if(S.get_amount() < 2)
return ..() user << "<span class='notice'>There isn't enough material here to construct a wall.</span>"
return 0
var/material/M = S.get_material() var/material/M = name_to_material[S.default_type]
if(!istype(M)) if(!istype(M))
return ..() return 0
var/wall_fake var/wall_fake
add_hiddenprint(usr) add_hiddenprint(usr)
if(M.integrity < 50) if(M.integrity < 50)
user << "<span class='notice'>This material is too soft for use in wall construction.</span>" user << "<span class='notice'>This material is too soft for use in wall construction.</span>"
return return 0
user << "<span class='notice'>You begin adding the plating...</span>" user << "<span class='notice'>You begin adding the plating...</span>"
if(!do_after(user,40) || !S.use(2)) if(!do_after(user,40) || !S.use(2))
return return 1 //once we've gotten this far don't call parent attackby()
if(anchored) if(anchored)
user << "<span class='notice'>You added the plating!</span>" user << "<span class='notice'>You added the plating!</span>"
@@ -143,60 +160,37 @@
T.can_open = 1 T.can_open = 1
T.add_hiddenprint(usr) T.add_hiddenprint(usr)
qdel(src) qdel(src)
return return 1
else if(istype(W, /obj/item/pipe)) /obj/structure/girder/proc/reinforce_with_material(obj/item/stack/material/S, mob/user) //if the verb is removed this can be renamed.
var/obj/item/pipe/P = W if(reinf_material)
if (P.pipe_type in list(0, 1, 5)) //simple pipes, simple bends, and simple manifolds. user << "<span class='notice'>\The [src] is already reinforced.</span>"
user.drop_item() return 0
P.loc = src.loc
user << "<span class='notice'>You fit the pipe into the [src]!</span>" if(S.get_amount() < 2)
else user << "<span class='notice'>There isn't enough material here to reinforce the girder.</span>"
..() return 0
var/material/M = name_to_material[S.default_type]
if(!istype(M) || M.integrity < 50)
user << "You cannot reinforce \the [src] with that; it is too soft."
return 0
user << "<span class='notice'>Now reinforcing...</span>"
if (!do_after(user,40) || !S.use(2))
return 1 //don't call parent attackby() past this point
user << "<span class='notice'>You added reinforcement!</span>"
reinf_material = M
reinforce_girder()
return 1
/obj/structure/girder/proc/reinforce_girder() /obj/structure/girder/proc/reinforce_girder()
cover = reinf_material.hardness cover = reinf_material.hardness
health = 500 health = 500
state = 2 state = 2
icon_state = "reinforced" icon_state = "reinforced"
reinforcing = 0
/obj/structure/girder/verb/reinforce_with_material()
set name = "Reinforce girder"
set desc = "Reinforce a girder with metal."
set src in view(1)
var/mob/living/user = usr
if(!istype(user) || !(user.l_hand || user.r_hand))
return
if(reinf_material)
user << "\The [src] is already reinforced."
return
var/obj/item/stack/material/S = user.l_hand
if(!istype(S))
S = user.r_hand
if(!istype(S))
user << "You cannot plate \the [src] with that."
return
if(S.get_amount() < 2)
user << "There is not enough material here to reinforce the girder."
return
var/material/M = S.get_material()
if(!istype(M) || M.integrity < 50)
user << "You cannot reinforce \the [src] with that; it is too soft."
return
user << "<span class='notice'>Now reinforcing...</span>"
if (!do_after(user,40) || !S.use(2))
return
user << "<span class='notice'>You added reinforcement!</span>"
reinf_material = M
reinforce_girder()
/obj/structure/girder/proc/dismantle() /obj/structure/girder/proc/dismantle()
new /obj/item/stack/material/steel(get_turf(src)) new /obj/item/stack/material/steel(get_turf(src))

View File

@@ -53,8 +53,9 @@ client/verb/JoinResponseTeam()
if(jobban_isbanned(usr, "Syndicate") || jobban_isbanned(usr, "Emergency Response Team") || jobban_isbanned(usr, "Security Officer")) if(jobban_isbanned(usr, "Syndicate") || jobban_isbanned(usr, "Emergency Response Team") || jobban_isbanned(usr, "Security Officer"))
usr << "<font color=red><b>You are jobbanned from the emergency reponse team!" usr << "<font color=red><b>You are jobbanned from the emergency reponse team!"
return return
if(ert.current_antagonists.len > 5) if(ert.current_antagonists.len >= ert.max_antags)
usr << "The emergency response team is already full!" usr << "The emergency response team is already full!"
return
ert.create_default(usr) ert.create_default(usr)
else else
usr << "You need to be an observer or new player to use this." usr << "You need to be an observer or new player to use this."

View File

@@ -50,7 +50,7 @@
//Set species_restricted list //Set species_restricted list
switch(target_species) switch(target_species)
if("Human", "Skrell") //humanoid bodytypes if("Human", "Skrell") //humanoid bodytypes
species_restricted = list("exclude","Unathi","Tajara","Diona","Vox", "Xenomorph", "Xenomorph Drone", "Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Queen") species_restricted = list("exclude","Unathi","Tajara","Diona","Vox", "Xenomorph")
else else
species_restricted = list(target_species) species_restricted = list(target_species)
@@ -72,9 +72,9 @@
//Set species_restricted list //Set species_restricted list
switch(target_species) switch(target_species)
if("Skrell") if("Skrell")
species_restricted = list("exclude","Unathi","Tajara","Diona","Vox", "Xenomorph", "Xenomorph Drone", "Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Queen") species_restricted = list("exclude","Unathi","Tajara","Diona","Vox", "Xenomorph")
if("Human") if("Human")
species_restricted = list("exclude","Skrell","Unathi","Tajara","Diona","Vox", "Xenomorph", "Xenomorph Drone", "Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Queen") species_restricted = list("exclude","Skrell","Unathi","Tajara","Diona","Vox", "Xenomorph")
else else
species_restricted = list(target_species) species_restricted = list(target_species)

View File

@@ -23,7 +23,7 @@
usr << "Your module is not installed in a hardsuit." usr << "Your module is not installed in a hardsuit."
return return
module.holder.ui_interact(usr) module.holder.ui_interact(usr, nano_state = contained_state)
/obj/item/rig_module/ai_container /obj/item/rig_module/ai_container
@@ -46,9 +46,23 @@
var/obj/item/ai_card // Reference to the MMI, posibrain, intellicard or pAI card previously holding the AI. var/obj/item/ai_card // Reference to the MMI, posibrain, intellicard or pAI card previously holding the AI.
var/obj/item/ai_verbs/verb_holder var/obj/item/ai_verbs/verb_holder
/mob
var/get_rig_stats = 0
/obj/item/rig_module/ai_container/process() /obj/item/rig_module/ai_container/process()
if(integrated_ai && loc) if(integrated_ai)
integrated_ai.SetupStat(loc.get_rig()) var/obj/item/weapon/rig/rig = get_rig()
if(rig && rig.ai_override_enabled)
integrated_ai.get_rig_stats = 1
else
integrated_ai.get_rig_stats = 0
/mob/living/Stat()
. = ..()
if(. && get_rig_stats)
var/obj/item/weapon/rig/rig = get_rig()
if(rig)
SetupStat(rig)
/obj/item/rig_module/ai_container/proc/update_verb_holder() /obj/item/rig_module/ai_container/proc/update_verb_holder()
if(!verb_holder) if(!verb_holder)
@@ -158,7 +172,10 @@
if(integrated_ai) if(integrated_ai)
integrated_ai.ghostize() integrated_ai.ghostize()
qdel(integrated_ai) qdel(integrated_ai)
if(ai_card) qdel(ai_card) integrated_ai = null
if(ai_card)
qdel(ai_card)
ai_card = null
else if(user) else if(user)
user.put_in_hands(ai_card) user.put_in_hands(ai_card)
else else
@@ -168,7 +185,6 @@
update_verb_holder() update_verb_holder()
/obj/item/rig_module/ai_container/proc/integrate_ai(var/obj/item/ai,var/mob/user) /obj/item/rig_module/ai_container/proc/integrate_ai(var/obj/item/ai,var/mob/user)
if(!ai) return if(!ai) return
// The ONLY THING all the different AI systems have in common is that they all store the mob inside an item. // The ONLY THING all the different AI systems have in common is that they all store the mob inside an item.

View File

@@ -227,21 +227,21 @@
return 0 return 0
/mob/living/carbon/human/Stat() /mob/living/carbon/human/Stat()
..() . = ..()
if(istype(back,/obj/item/weapon/rig)) if(. && istype(back,/obj/item/weapon/rig))
var/obj/item/weapon/rig/R = back var/obj/item/weapon/rig/R = back
SetupStat(R) SetupStat(R)
/mob/proc/SetupStat(var/obj/item/weapon/rig/R) /mob/proc/SetupStat(var/obj/item/weapon/rig/R)
if(src == usr && R && !R.canremove && R.installed_modules.len && statpanel("Hardsuit Modules")) if(R && !R.canremove && R.installed_modules.len && statpanel("Hardsuit Modules"))
var/cell_status = R.cell ? "[R.cell.charge]/[R.cell.maxcharge]" : "ERROR" var/cell_status = R.cell ? "[R.cell.charge]/[R.cell.maxcharge]" : "ERROR"
statpanel("Hardsuit Modules", "Suit charge", cell_status) stat("Suit charge", cell_status)
for(var/obj/item/rig_module/module in R.installed_modules) for(var/obj/item/rig_module/module in R.installed_modules)
{ {
for(var/stat_rig_module/SRM in module.stat_modules) for(var/stat_rig_module/SRM in module.stat_modules)
if(SRM.CanUse()) if(SRM.CanUse())
statpanel("Hardsuit Modules",SRM.module.interface_name,SRM) stat(SRM.module.interface_name,SRM)
} }
/stat_rig_module /stat_rig_module

View File

@@ -383,8 +383,7 @@
cell.use(cost*10) cell.use(cost*10)
return 1 return 1
/obj/item/weapon/rig/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) /obj/item/weapon/rig/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/nano_state = inventory_state)
if(!user) if(!user)
return return
@@ -454,7 +453,7 @@
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui) if (!ui)
ui = new(user, src, ui_key, ((src.loc != user) ? ai_interface_path : interface_path), interface_title, 480, 550, data["ai"] ? contained_state : inventory_state) ui = new(user, src, ui_key, ((src.loc != user) ? ai_interface_path : interface_path), interface_title, 480, 550, state = nano_state)
ui.set_initial_data(data) ui.set_initial_data(data)
ui.open() ui.open()
ui.set_auto_update(1) ui.set_auto_update(1)
@@ -766,6 +765,7 @@
return 0 return 0
wearer.Move(null,dir)*/ wearer.Move(null,dir)*/
// This returns the rig if you are contained inside one, but not if you are wearing it
/atom/proc/get_rig() /atom/proc/get_rig()
if(loc) if(loc)
return loc.get_rig() return loc.get_rig()

View File

@@ -18,7 +18,7 @@
cold_protection = HEAD cold_protection = HEAD
min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE
siemens_coefficient = 0.9 siemens_coefficient = 0.9
species_restricted = list("exclude","Diona","Vox", "Xenomorph", "Xenomorph Drone", "Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Queen") species_restricted = list("exclude","Diona", "Xenomorph")
var/obj/machinery/camera/camera var/obj/machinery/camera/camera
var/list/camera_networks var/list/camera_networks
@@ -63,7 +63,7 @@
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
siemens_coefficient = 0.9 siemens_coefficient = 0.9
species_restricted = list("exclude","Diona","Vox", "Xenomorph", "Xenomorph Drone", "Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Queen") species_restricted = list("exclude","Diona", "Xenomorph")
var/list/supporting_limbs //If not-null, automatically splints breaks. Checked when removing the suit. var/list/supporting_limbs //If not-null, automatically splints breaks. Checked when removing the suit.

View File

@@ -6,7 +6,7 @@
item_state = "syndie_helm" item_state = "syndie_helm"
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 60) armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 60)
siemens_coefficient = 0.6 siemens_coefficient = 0.6
species_restricted = list("exclude","Unathi","Tajara","Skrell","Vox", "Xenomorph", "Xenomorph Drone", "Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Queen") species_restricted = list("exclude","Unathi","Tajara","Skrell","Vox", "Xenomorph")
camera_networks = list("NUKE") camera_networks = list("NUKE")
light_overlay = "helmet_light_green" //todo: species-specific light overlays light_overlay = "helmet_light_green" //todo: species-specific light overlays
@@ -20,4 +20,4 @@
armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 60) armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 60)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs) allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs)
siemens_coefficient = 0.6 siemens_coefficient = 0.6
species_restricted = list("exclude","Unathi","Tajara","Skrell","Vox", "Xenomorph", "Xenomorph Drone", "Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Queen") species_restricted = list("exclude","Unathi","Tajara","Skrell","Vox", "Xenomorph")

View File

@@ -9,7 +9,7 @@
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
//Species-specific stuff. //Species-specific stuff.
species_restricted = list("exclude","Unathi","Tajara","Skrell","Diona","Vox", "Xenomorph", "Xenomorph Drone", "Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Queen") species_restricted = list("exclude","Unathi","Tajara","Skrell","Diona","Vox", "Xenomorph")
sprite_sheets_refit = list( sprite_sheets_refit = list(
"Unathi" = 'icons/mob/species/unathi/helmet.dmi', "Unathi" = 'icons/mob/species/unathi/helmet.dmi',
"Tajara" = 'icons/mob/species/tajaran/helmet.dmi', "Tajara" = 'icons/mob/species/tajaran/helmet.dmi',
@@ -34,7 +34,7 @@
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
species_restricted = list("exclude","Unathi","Tajara","Diona","Vox", "Xenomorph", "Xenomorph Drone", "Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Queen") species_restricted = list("exclude","Unathi","Tajara","Diona","Vox", "Xenomorph")
sprite_sheets_refit = list( sprite_sheets_refit = list(
"Unathi" = 'icons/mob/species/unathi/suit.dmi', "Unathi" = 'icons/mob/species/unathi/suit.dmi',
"Tajara" = 'icons/mob/species/tajaran/suit.dmi', "Tajara" = 'icons/mob/species/tajaran/suit.dmi',

View File

@@ -40,7 +40,7 @@
cultnet.updateVisibility(src) cultnet.updateVisibility(src)
/datum/antagonist/add_antagonist(var/datum/mind/player) /datum/antagonist/add_antagonist(var/datum/mind/player)
..() . = ..()
if(src == cult) if(src == cult)
cultnet.updateVisibility(player.current, 0) cultnet.updateVisibility(player.current, 0)

View File

@@ -293,6 +293,10 @@
else else
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]. It has[temp.get_wounds_desc()]!</span>\n" wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]. It has[temp.get_wounds_desc()]!</span>\n"
else if(temp.wounds.len > 0 || temp.open) else if(temp.wounds.len > 0 || temp.open)
if(temp.is_stump() && temp.parent_organ && organs_by_name[temp.parent_organ])
var/obj/item/organ/external/parent = organs_by_name[temp.parent_organ]
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has [temp.get_wounds_desc()] on [t_his] [parent.name].</span><br>"
else
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has [temp.get_wounds_desc()] on [t_his] [temp.name].</span><br>" wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has [temp.get_wounds_desc()] on [t_his] [temp.name].</span><br>"
if(temp.status & ORGAN_BLEEDING) if(temp.status & ORGAN_BLEEDING)
is_bleeding["[temp.name]"] = "<span class='danger'>[capitalize(t_his)] [temp.name] is bleeding!</span><br>" is_bleeding["[temp.name]"] = "<span class='danger'>[capitalize(t_his)] [temp.name] is bleeding!</span><br>"

View File

@@ -32,7 +32,6 @@
var/obj/item/organ/brain/sponge = internal_organs_by_name["brain"] var/obj/item/organ/brain/sponge = internal_organs_by_name["brain"]
if(sponge) if(sponge)
sponge.take_damage(amount) sponge.take_damage(amount)
sponge.damage = min(max(sponge.damage, 0),(maxHealth*2))
brainloss = sponge.damage brainloss = sponge.damage
else else
brainloss = 200 brainloss = 200

View File

@@ -370,7 +370,7 @@ var/list/ai_verbs_default = list(
if(emergency_message_cooldown) if(emergency_message_cooldown)
usr << "<span class='warning'>Arrays recycling. Please stand by.</span>" usr << "<span class='warning'>Arrays recycling. Please stand by.</span>"
return return
var/input = input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "") var/input = sanitize(input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", ""))
if(!input) if(!input)
return return
Centcomm_announce(input, usr) Centcomm_announce(input, usr)

View File

@@ -87,6 +87,9 @@
/obj/item/weapon/gripper/no_use //Used when you want to hold and put items in other things, but not able to 'use' the item /obj/item/weapon/gripper/no_use //Used when you want to hold and put items in other things, but not able to 'use' the item
/obj/item/weapon/gripper/no_use/attack_self(mob/user as mob)
return
/obj/item/weapon/gripper/no_use/loader //This is used to disallow building with metal. /obj/item/weapon/gripper/no_use/loader //This is used to disallow building with metal.
name = "sheet loader" name = "sheet loader"
desc = "A specialized loading device, designed to pick up and insert sheets of materials inside machines." desc = "A specialized loading device, designed to pick up and insert sheets of materials inside machines."
@@ -101,9 +104,6 @@
return wrapped.attack_self(user) return wrapped.attack_self(user)
return ..() return ..()
/obj/item/weapon/gripper/no_use/attack_self(mob/user as mob)
return
/obj/item/weapon/gripper/verb/drop_item() /obj/item/weapon/gripper/verb/drop_item()
set name = "Drop Item" set name = "Drop Item"
@@ -130,6 +130,8 @@
force_holder = wrapped.force force_holder = wrapped.force
wrapped.force = 0.0 wrapped.force = 0.0
wrapped.attack(M,user) wrapped.attack(M,user)
if(deleted(wrapped))
wrapped = null
return 1 return 1
return 0 return 0

View File

@@ -227,14 +227,15 @@ var/list/organ_cache = list()
W.damage += damage W.damage += damage
W.time_inflicted = world.time W.time_inflicted = world.time
//Note: external organs have their own version of this proc
/obj/item/organ/proc/take_damage(amount, var/silent=0) /obj/item/organ/proc/take_damage(amount, var/silent=0)
if(src.status & ORGAN_ROBOT) if(src.status & ORGAN_ROBOT)
src.damage += (amount * 0.8) src.damage = between(0, src.damage + (amount * 0.8), max_damage)
else else
src.damage += amount src.damage = between(0, src.damage + amount, max_damage)
//only show this if the organ is not robotic //only show this if the organ is not robotic
if(owner && parent_organ) if(owner && parent_organ && amount > 0)
var/obj/item/organ/external/parent = owner.get_organ(parent_organ) var/obj/item/organ/external/parent = owner.get_organ(parent_organ)
if(parent && !silent) if(parent && !silent)
owner.custom_pain("Something inside your [parent.name] hurts a lot.", 1) owner.custom_pain("Something inside your [parent.name] hurts a lot.", 1)

View File

@@ -729,17 +729,13 @@
if (usr.stat != 0) if (usr.stat != 0)
return return
if (holdingitems && holdingitems.len == 0) if (!holdingitems || holdingitems.len == 0)
return return
for(var/obj/item/O in holdingitems) for(var/obj/item/O in holdingitems)
O.loc = src.loc O.loc = src.loc
holdingitems -= O holdingitems -= O
holdingitems = list() holdingitems.Cut()
/obj/machinery/reagentgrinder/proc/remove_object(var/obj/item/O)
holdingitems -= O
qdel(O)
/obj/machinery/reagentgrinder/proc/grind() /obj/machinery/reagentgrinder/proc/grind()
@@ -762,10 +758,6 @@
// Process. // Process.
for (var/obj/item/O in holdingitems) for (var/obj/item/O in holdingitems)
if(!O || !istype(O))
holdingitems -= null
continue
var/remaining_volume = beaker.reagents.maximum_volume - beaker.reagents.total_volume var/remaining_volume = beaker.reagents.maximum_volume - beaker.reagents.total_volume
if(remaining_volume <= 0) if(remaining_volume <= 0)
break break
@@ -776,13 +768,16 @@
var/amount_to_take = max(0,min(stack.amount,round(remaining_volume/REAGENTS_PER_SHEET))) var/amount_to_take = max(0,min(stack.amount,round(remaining_volume/REAGENTS_PER_SHEET)))
if(amount_to_take) if(amount_to_take)
stack.use(amount_to_take) stack.use(amount_to_take)
if(deleted(stack))
holdingitems -= stack
beaker.reagents.add_reagent(sheet_reagents[stack.type], (amount_to_take*REAGENTS_PER_SHEET)) beaker.reagents.add_reagent(sheet_reagents[stack.type], (amount_to_take*REAGENTS_PER_SHEET))
continue continue
if(O.reagents) if(O.reagents)
O.reagents.trans_to(beaker, min(O.reagents.total_volume, remaining_volume)) O.reagents.trans_to(beaker, min(O.reagents.total_volume, remaining_volume))
if(O.reagents.total_volume == 0) if(O.reagents.total_volume == 0)
remove_object(O) holdingitems -= O
qdel(O)
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume) if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
break break

View File

@@ -56,6 +56,19 @@
--> -->
<div class="commit sansserif"> <div class="commit sansserif">
<h2 class="date">24 August 2015</h2>
<h3 class="author">HarpyEagle updated:</h3>
<ul class="changes bgimages16">
<li class="tweak">Girders are now reinforced by using a screwdriver on the girder before applying the material sheets. Use a screwdriver again instead to cancel reinforcing.</li>
<li class="bugfix">Mechanical traps no longer spawn in the janitor's locker.</li>
<li class="rscadd">Mechanical traps can now be printed with a hacked autolathe.</li>
</ul>
<h3 class="author">Zuhayr updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">Pariahs are now a subspecies of Vox with less atmos/cold protection, a useless brain, and lower health.</li>
<li class="rscadd">Leap now only gives a passive grab and has a shorter range. It also stuns Pariahs longer than it does their target.</li>
</ul>
<h2 class="date">17 August 2015</h2> <h2 class="date">17 August 2015</h2>
<h3 class="author">PsiOmegaDelta updated:</h3> <h3 class="author">PsiOmegaDelta updated:</h3>
<ul class="changes bgimages16"> <ul class="changes bgimages16">

View File

@@ -2109,3 +2109,14 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
2015-08-17: 2015-08-17:
PsiOmegaDelta: PsiOmegaDelta:
- rscadd: Station time and duration now available in the Status tab. - rscadd: Station time and duration now available in the Status tab.
2015-08-24:
HarpyEagle:
- tweak: Girders are now reinforced by using a screwdriver on the girder before
applying the material sheets. Use a screwdriver again instead to cancel reinforcing.
- bugfix: Mechanical traps no longer spawn in the janitor's locker.
- rscadd: Mechanical traps can now be printed with a hacked autolathe.
Zuhayr:
- rscadd: Pariahs are now a subspecies of Vox with less atmos/cold protection, a
useless brain, and lower health.
- rscadd: Leap now only gives a passive grab and has a shorter range. It also stuns
Pariahs longer than it does their target.

View File

@@ -1,19 +0,0 @@
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
author: HarpyEagle
delete-after: True
changes:
- bugfix: "Mechanical traps no longer spawn in the janitor's locker."
- rscadd: "Mechanical traps can now be printed with a hacked autolathe."

View File

@@ -1,5 +0,0 @@
author: Zuhayr
delete-after: True
changes:
- rscadd: "Pariahs are now a subspecies of Vox with less atmos/cold protection, a useless brain, and lower health."
- rscadd: "Leap now only gives a passive grab and has a shorter range. It also stuns Pariahs longer than it does their target."

File diff suppressed because it is too large Load Diff