Merge pull request #1713 from Markolie/master

Fixes
This commit is contained in:
Fox-McCloud
2015-08-12 17:37:22 -04:00
19 changed files with 94 additions and 50 deletions
@@ -172,7 +172,7 @@ var/global/sent_syndicate_strike_team = 0
W.icon_state = "syndie"
W.access = get_all_accesses()//They get full station access because obviously the syndicate has HAAAX, and can make special IDs for their most elite members.
W.assignment = "Syndicate Commando"
W.access = get_syndicate_access(W.assignment)
W.access += get_syndicate_access(W.assignment)
W.registered_name = real_name
equip_to_slot_or_del(W, slot_wear_id)
+1 -3
View File
@@ -52,10 +52,8 @@ var/global/vox_tick = 1
equip_to_slot_or_del(new /obj/item/weapon/tank/nitrogen(src), slot_back)
equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_r_store)
var/obj/item/weapon/card/id/syndicate/W = new(src)
var/obj/item/weapon/card/id/syndicate/vox/W = new(src)
W.name = "[real_name]'s Legitimate Human ID Card"
W.icon_state = "id"
W.access = list(access_vox)
W.assignment = "Trader"
W.registered_name = real_name
W.registered_user = src
@@ -431,7 +431,9 @@
var/armor_block = run_armor_check(affecting, "melee")
apply_damage(damage, BRUTE, affecting, armor_block)
/mob/living/carbon/human/proc/is_loyalty_implanted(mob/living/carbon/human/M)
/mob/living/carbon/human/proc/is_loyalty_implanted(mob/living/carbon/human/M)
if(!istype(M))
return 0
for(var/L in M.contents)
if(istype(L, /obj/item/weapon/implant/loyalty))
for(var/obj/item/organ/external/O in M.organs)
@@ -452,6 +452,9 @@
blood_color = "#1F181F"
flesh_color = "#AAAAAA"
reagent_tag = PROCESS_SYN
has_organ = list(
)
/datum/species/machine/handle_death(var/mob/living/carbon/human/H)
H.emote("deathgasp")
@@ -213,6 +213,7 @@ var/global/list/damage_icon_parts = list()
if(O.damage_state == "00") continue
var/icon/DI
var/cache_index = "[O.damage_state]/[O.icon_name]/[species.blood_color]/[species.name]"
if(damage_icon_parts[cache_index] == null)
DI = new /icon(species.damage_overlays, O.damage_state) // the damage icon for whole human
DI.Blend(new /icon(species.damage_mask, O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels
@@ -216,7 +216,7 @@
..()
/datum/objective/revenant/check_completion()
if(!istype(owner.current, /mob/living/simple_animal/revenant) || !owner.current)
if(!owner || !istype(owner.current, /mob/living/simple_animal/revenant))
return 0
var/mob/living/simple_animal/revenant/R = owner.current
if(!R || R.stat == DEAD)
+1 -1
View File
@@ -27,7 +27,7 @@
/mob/living/silicon/robot/shared_nano_interaction()
. = STATUS_INTERACTIVE
if(cell.charge <= 0)
if(!cell || cell.charge <= 0)
return STATUS_CLOSE
if(lockcharge)
. = STATUS_DISABLED
+1 -2
View File
@@ -27,7 +27,6 @@
if(alarm)
var/datum/topic_state/TS = generate_state(alarm)
alarm.ui_interact(usr, master_ui = ui_ref, state = TS)
return 1
/datum/nano_module/atmos_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state)
var/data[0]
@@ -69,4 +68,4 @@
return extra_href
/datum/topic_state/air_alarm/proc/has_access(var/mob/user)
return user && (isAI(user) || atmos_control.access.allowed(user) || atmos_control.emagged || air_alarm.rcon_setting == RCON_YES || (air_alarm.alarm_area.atmosalm && air_alarm.rcon_setting == RCON_AUTO))
return user && (isAI(user) || atmos_control.access.allowed(user) || atmos_control.emagged || air_alarm.rcon_setting == RCON_YES || air_alarm.emagged || (air_alarm.alarm_area.atmosalm && air_alarm.rcon_setting == RCON_AUTO))
+20
View File
@@ -104,6 +104,26 @@
update_count++
return update_count
/**
* Close all /nanoui uis attached to src_object
*
* @param src_object /obj|/mob The obj or mob which the uis are attached to
*
* @return int The number of uis close
*/
/datum/nanomanager/proc/close_uis(src_object)
var/src_object_key = "\ref[src_object]"
if (isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list))
return 0
var/close_count = 0
for (var/ui_key in open_uis[src_object_key])
for (var/datum/nanoui/ui in open_uis[src_object_key][ui_key])
if(ui && ui.src_object && ui.user && ui.src_object.nano_host())
ui.close()
close_count++
return close_count
/**
* Update /nanoui uis belonging to user
*
+25 -23
View File
@@ -150,7 +150,7 @@
return
if(terminal) //is there already a terminal ?
user << "<span class='alert'>This SMES already have a power terminal!</span>"
user << "<span class='alert'>This SMES already has a power terminal!</span>"
return
if(!panel_open) //is the panel open ?
@@ -162,31 +162,14 @@
user << "<span class='alert'>You must first remove the floor plating!</span>"
return
var/obj/item/stack/cable_coil/C = I
if(C.amount < 10)
user << "<span class='alert'>You need more wires.</span>"
return
user << "You start building the power terminal..."
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20) && C.amount >= 10)
var/obj/structure/cable/N = T.get_cable_node() //get the connecting node cable, if there's one
if (prob(50) && electrocute_mob(usr, N, N)) //animate the electrocution if uncautious and unlucky
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
return
C.use(10)
user.visible_message(\
"<span class='alert'>[user.name] has built a power terminal!</span>",\
"You build the power terminal.")
//build the terminal and link it to the network
make_terminal(T)
terminal.connect_to_network()
//build the terminal and link it to the network
make_terminal(user)
terminal.connect_to_network()
return
//disassembling the terminal
@@ -196,7 +179,7 @@
user << "<span class='alert'>You must first expose the power terminal!</span>"
return
user << "You begin to dismantle the power terminal..."
user << "<span class='notice'>You begin to dismantle the power terminal...</span>"
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 50))
@@ -210,13 +193,20 @@
new /obj/item/stack/cable_coil(T,10)
user.visible_message(\
"<span class='alert'>[user.name] cuts the cables and dismantles the power terminal.</span>",\
"You cut the cables and dismantle the power terminal.")
"<span class='notice'>You cut the cables and dismantle the power terminal.</span>")
inputting = 0 //stop inputting, since we have don't have a terminal anymore
qdel(terminal)
return
//crowbarring it !
default_deconstruction_crowbar(I)
/obj/machinery/power/smes/disconnect_terminal()
if(terminal)
terminal.master = null
terminal = null
return 1
return 0
/obj/machinery/power/smes/Destroy()
if(ticker && ticker.current_state == GAME_STATE_PLAYING)
@@ -332,6 +322,18 @@
return 1
user << "<span class='notice'>You start adding cable to the [src].</span>"
if(do_after(user, 50))
var/turf/T = get_turf(user)
var/obj/structure/cable/N = T.get_cable_node() //get the connecting node cable, if there's one
if (prob(50) && electrocute_mob(user, N, N)) //animate the electrocution if uncautious and unlucky
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
return
user.visible_message(\
"<span class='notice'>[user.name] adds the cables and connects the power terminal.</span>",\
"<span class='notice'>You add the cables and connect the power terminal.</span>")
terminal = new /obj/machinery/power/terminal(tempLoc)
terminal.dir = tempDir
terminal.master = src
@@ -17,6 +17,8 @@ datum/reagents/proc/metabolize(var/mob/M)
handle_reactions()
for(var/A in reagent_list)
var/datum/reagent/R = A
if(!istype(R))
continue
if(ishuman(M))
var/mob/living/carbon/human/H = M
//Check if this mob's species is set and can process this type of reagent
@@ -37,7 +37,7 @@
return
/obj/item/weapon/reagent_containers/food/snacks/attack(mob/M as mob, mob/user as mob, def_zone)
if(!reagents.total_volume) //Shouldn't be needed but it checks to see if it has anything left in it.
if(reagents && !reagents.total_volume) //Shouldn't be needed but it checks to see if it has anything left in it.
user << "\red None of [src] left, oh no!"
M.unEquip(src) //so icons update :[
qdel(src)