Bug fixes galore

This commit is contained in:
Markolie
2015-03-01 20:35:07 +01:00
parent 23da335c32
commit d7a2559065
18 changed files with 118 additions and 94 deletions
+1 -1
View File
@@ -120,8 +120,8 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
var/datum/objective/escape/escape_with_identity/identity_theft = new
identity_theft.owner = changeling
identity_theft.target = kill_objective.target
identity_theft.target_real_name = kill_objective.target.current.real_name //Whoops, forgot this.
if(identity_theft.target && identity_theft.target.current)
identity_theft.target_real_name = kill_objective.target.current.real_name //Whoops, forgot this.
var/mob/living/carbon/human/H = identity_theft.target.current
if(H.species && H.species.flags && H.species.flags & NO_SCAN) // For species that can't be absorbed - should default to an escape objective instead
return
@@ -22,12 +22,12 @@
/obj/effect/proc_holder/changeling/weapon/try_to_sting(var/mob/user, var/mob/target)
if(istype(user.l_hand, weapon_type)) //Not the nicest way to do it, but eh
qdel(user.l_hand)
del(user.l_hand)
user.visible_message("<span class='warning'>With a sickening crunch, [user] reforms his [weapon_name_simple] into an arm!</span>", "<span class='notice'>We assimilate the [weapon_name_simple] back into our body.</span>", "<span class='warning>You hear organic matter ripping and tearing!</span>")
user.update_inv_l_hand()
return
if(istype(user.r_hand, weapon_type))
qdel(user.r_hand)
del(user.r_hand)
user.visible_message("<span class='warning'>With a sickening crunch, [user] reforms his [weapon_name_simple] into an arm!</span>", "<span class='notice'>We assimilate the [weapon_name_simple] back into our body.</span>", "<span class='warning>You hear organic matter ripping and tearing!</span>")
user.update_inv_r_hand()
return
@@ -65,8 +65,8 @@
var/mob/living/carbon/human/H = user
if(istype(H.wear_suit, suit_type) || istype(H.head, helmet_type))
H.visible_message("<span class='warning'>[H] casts off their [suit_name_simple]!</span>", "<span class='warning'>We cast off our [suit_name_simple][genetic_damage > 0 ? ", temporarily weakening our genomes." : "."]</span>", "<span class='warning'>You hear the organic matter ripping and tearing!</span>")
qdel(H.wear_suit)
qdel(H.head)
del(H.wear_suit)
del(H.head)
H.update_inv_wear_suit()
H.update_inv_head()
H.update_hair()
@@ -140,7 +140,7 @@
/obj/item/weapon/melee/arm_blade/dropped(mob/user)
user.visible_message("<span class='warning'>With a sickening crunch, [user] reforms his blade into an arm!</span>", "<span class='notice'>We assimilate the blade back into our body.</span>", "<span class='warning>You hear organic matter ripping and tearing!</span>")
qdel(src)
del(src)
/obj/item/weapon/melee/arm_blade/afterattack(atom/target, mob/user, proximity)
if(!proximity)
@@ -216,7 +216,7 @@
loc.visible_message("<span class='warning'>The end of [loc.name]\'s hand inflates rapidly, forming a huge shield-like mass!</span>", "<span class='warning'>We inflate our hand into a strong shield.</span>", "<span class='warning'>You hear organic matter ripping and tearing!</span>")
/obj/item/weapon/shield/changeling/dropped()
qdel(src)
del(src)
/obj/item/weapon/shield/changeling/IsShield()
if(remaining_uses < 1)
@@ -224,7 +224,7 @@
var/mob/living/carbon/human/H = loc
H.visible_message("<span class='warning'>With a sickening crunch, [H] reforms his shield into an arm!</span>", "<span class='notice'>We assimilate our shield into our body</span>", "<span class='warning>You hear organic matter ripping and tearing!</span>")
H.unEquip(src, 1)
qdel(src)
del(src)
return 0
else
remaining_uses--
@@ -269,7 +269,7 @@
processing_objects += src
/obj/item/clothing/suit/space/changeling/dropped()
qdel(src)
del(src)
/obj/item/clothing/suit/space/changeling/process()
if(ishuman(loc))
@@ -284,7 +284,7 @@
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
/obj/item/clothing/head/helmet/space/changeling/dropped()
qdel(src)
del(src)
/***************************************\
@@ -324,7 +324,7 @@
loc.visible_message("<span class='warning'>[loc.name]\'s flesh turns black, quickly transforming into a hard, chitinous mass!</span>", "<span class='warning'>We harden our flesh, creating a suit of armor!</span>", "<span class='warning'>You hear organic matter ripping and tearing!</span>")
/obj/item/clothing/suit/armor/changeling/dropped()
qdel(src)
del(src)
/obj/item/clothing/head/helmet/changeling
name = "chitinous mass"
@@ -335,4 +335,4 @@
flags_inv = HIDEEARS
/obj/item/clothing/head/helmet/changeling/dropped()
qdel(src)
del(src)
+2
View File
@@ -140,6 +140,7 @@
return
/obj/machinery/computer/attack_paw(mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
if(circuit)
if(prob(10))
@@ -153,6 +154,7 @@
"<span class='danger'>You hear a clicking sound.</span>")
/obj/machinery/computer/attack_alien(mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
if(circuit)
if(prob(80))
+3 -4
View File
@@ -23,15 +23,14 @@
if(isturf(T))
attached = locate() in T
if(attached)
powernet = attached.get_powernet()
powernet = attached.get_powernet()
/obj/machinery/power/monitor/attack_ai(mob/user)
add_fingerprint(user)
if(stat & (BROKEN|NOPOWER))
return
interact(user)
interact(user)
/obj/machinery/power/monitor/attack_hand(mob/user)
add_fingerprint(user)
@@ -93,6 +93,9 @@
/obj/machinery/computer/xenos_station/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/xenos_station/attack_alien(mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/xenos_station/attack_hand(mob/user as mob)
if(!allowed(user))
-3
View File
@@ -126,7 +126,6 @@
if(!node)
return
if(!on)
updateUsrDialog()
return
if(occupant)
@@ -141,7 +140,6 @@
if(abs(temperature_archived-air_contents.temperature) > 1)
network.update = 1
updateUsrDialog()
return 1
@@ -306,7 +304,6 @@
var/mob/M = G:affecting
if(put_mob(M))
del(G)
updateUsrDialog()
return
/obj/machinery/atmospherics/unary/cryo_cell/update_icon()
@@ -1,13 +1,15 @@
//base type for controllers of two-door systems
/obj/machinery/embedded_controller/radio/airlock
// Setup parameters only
radio_filter = RADIO_AIRLOCK
var/tag_exterior_door
var/tag_interior_door
var/tag_airpump
var/tag_chamber_sensor
var/tag_exterior_sensor
var/tag_interior_sensor
var/tag_mech_sensor
var/tag_airlock_mech_sensor
var/tag_shuttle_mech_sensor
var/tag_secure = 0
/obj/machinery/embedded_controller/radio/airlock/initialize()
@@ -1,8 +1,9 @@
//Handles the control of airlocks
#define STATE_WAIT 0
#define STATE_DEPRESSURIZE 1
#define STATE_PRESSURIZE 2
#define STATE_IDLE 0
#define STATE_PREPARE 1
#define STATE_DEPRESSURIZE 2
#define STATE_PRESSURIZE 3
#define TARGET_NONE 0
#define TARGET_INOPEN -1
@@ -16,9 +17,10 @@
var/tag_chamber_sensor
var/tag_exterior_sensor
var/tag_interior_sensor
var/tag_mech_sensor
var/tag_airlock_mech_sensor
var/tag_shuttle_mech_sensor
var/state = STATE_WAIT
var/state = STATE_IDLE
var/target_state = TARGET_NONE
/datum/computer/file/embedded_program/airlock/New(var/obj/machinery/embedded_controller/M)
@@ -42,7 +44,8 @@
tag_chamber_sensor = controller.tag_chamber_sensor? controller.tag_chamber_sensor : "[id_tag]_sensor"
tag_exterior_sensor = controller.tag_exterior_sensor
tag_interior_sensor = controller.tag_interior_sensor
tag_mech_sensor = controller.tag_mech_sensor? controller.tag_mech_sensor : "[id_tag]_mech"
tag_airlock_mech_sensor = controller.tag_airlock_mech_sensor? controller.tag_airlock_mech_sensor : "[id_tag]_airlock_mech"
tag_shuttle_mech_sensor = controller.tag_shuttle_mech_sensor? controller.tag_shuttle_mech_sensor : "[id_tag]_shuttle_mech"
memory["secure"] = controller.tag_secure
spawn(10)
@@ -157,7 +160,7 @@
/datum/computer/file/embedded_program/airlock/process()
if(!state)
if(!state) //Idle
if(target_state)
switch(target_state)
if(TARGET_INOPEN)
@@ -168,38 +171,45 @@
//lock down the airlock before activating pumps
close_doors()
var/chamber_pressure = memory["chamber_sensor_pressure"]
var/target_pressure = memory["target_pressure"]
if(memory["purge"])
target_pressure = 0
if(chamber_pressure <= target_pressure)
state = STATE_PRESSURIZE
signalPump(tag_airpump, 1, 1, target_pressure) //send a signal to start pressurizing
else if(chamber_pressure > target_pressure)
state = STATE_DEPRESSURIZE
signalPump(tag_airpump, 1, 0, target_pressure) //send a signal to start depressurizing
//Check for vacuum - this is set after the pumps so the pumps are aiming for 0
if(!memory["target_pressure"])
memory["target_pressure"] = ONE_ATMOSPHERE * 0.05
state = STATE_PREPARE
else
//make sure to return to a sane idle state
if(memory["pump_status"] != "off") //send a signal to stop pumping
signalPump(tag_airpump, 0)
//the airlock will not allow itself to continue to cycle when any of the doors are forced open.
if (state && !check_doors_secured())
if ((state == STATE_PRESSURIZE || state == STATE_DEPRESSURIZE) && !check_doors_secured())
//the airlock will not allow itself to continue to cycle when any of the doors are forced open.
stop_cycling()
switch(state)
if(STATE_PREPARE)
if (check_doors_secured())
var/chamber_pressure = memory["chamber_sensor_pressure"]
var/target_pressure = memory["target_pressure"]
if(memory["purge"])
target_pressure = 0
if(memory["purge"])
target_pressure = 0
if(chamber_pressure <= target_pressure)
state = STATE_PRESSURIZE
signalPump(tag_airpump, 1, 1, target_pressure) //send a signal to start pressurizing
else if(chamber_pressure > target_pressure)
state = STATE_DEPRESSURIZE
signalPump(tag_airpump, 1, 0, target_pressure) //send a signal to start depressurizing
//Check for vacuum - this is set after the pumps so the pumps are aiming for 0
if(!memory["target_pressure"])
memory["target_pressure"] = ONE_ATMOSPHERE * 0.05
if(STATE_PRESSURIZE)
if(memory["chamber_sensor_pressure"] >= memory["target_pressure"] * 0.95)
cycleDoors(target_state)
state = STATE_WAIT
state = STATE_IDLE
target_state = TARGET_NONE
if(memory["pump_status"] != "off")
@@ -216,7 +226,7 @@
else if(memory["chamber_sensor_pressure"] <= memory["target_pressure"] * 1.05)
cycleDoors(target_state)
state = STATE_WAIT
state = STATE_IDLE
target_state = TARGET_NONE
//send a signal to stop pumping
@@ -231,11 +241,11 @@
//these are here so that other types don't have to make so many assuptions about our implementation
/datum/computer/file/embedded_program/airlock/proc/begin_cycle_in()
state = STATE_WAIT
state = STATE_IDLE
target_state = TARGET_INOPEN
/datum/computer/file/embedded_program/airlock/proc/begin_cycle_out()
state = STATE_WAIT
state = STATE_IDLE
target_state = TARGET_OUTOPEN
/datum/computer/file/embedded_program/airlock/proc/close_doors()
@@ -243,11 +253,11 @@
toggleDoor(memory["exterior_status"], tag_exterior_door, 1, "close")
/datum/computer/file/embedded_program/airlock/proc/stop_cycling()
state = STATE_WAIT
state = STATE_IDLE
target_state = TARGET_NONE
/datum/computer/file/embedded_program/airlock/proc/done_cycling()
return (state == STATE_WAIT && target_state == TARGET_NONE)
return (state == STATE_IDLE && target_state == TARGET_NONE)
//are the doors closed and locked?
/datum/computer/file/embedded_program/airlock/proc/check_exterior_door_secured()
@@ -295,11 +305,19 @@
signalDoor(tag_exterior_door, command)
signalDoor(tag_interior_door, command)
datum/computer/file/embedded_program/airlock/proc/signal_mech_sensor(var/command, var/sensor)
var/datum/signal/signal = new
signal.data["tag"] = sensor
signal.data["command"] = command
post_signal(signal)
/datum/computer/file/embedded_program/airlock/proc/enable_mech_regulation()
signalDoor(tag_mech_sensor, "enable")
signal_mech_sensor("enable", tag_shuttle_mech_sensor)
signal_mech_sensor("enable", tag_airlock_mech_sensor)
/datum/computer/file/embedded_program/airlock/proc/disable_mech_regulation()
signalDoor(tag_mech_sensor, "disable")
signal_mech_sensor("disable", tag_shuttle_mech_sensor)
signal_mech_sensor("disable", tag_airlock_mech_sensor)
/*----------------------------------------------------------
toggleDoor()
@@ -355,7 +373,7 @@ send an additional command to open the door again.
signalDoor(doorTag, doorCommand)
#undef STATE_WAIT
#undef STATE_IDLE
#undef STATE_DEPRESSURIZE
#undef STATE_PRESSURIZE
+1 -1
View File
@@ -357,7 +357,7 @@
/obj/machinery/porta_turret/bullet_act(obj/item/projectile/Proj)
if(Proj.damage_type == HALLOSS)
if(Proj.damage_type == HALLOSS || Proj.damage_type == STAMINA)
return
if(enabled)
@@ -82,7 +82,7 @@
log_game("[key_name(user)] planted C4 on [key_name(target)] with [timer] second fuse")
else
message_admins("[key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) planted C4 on [target.name] at ([target.x],[target.y],[target.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>) with [timer] second fuse",0,1)
message_admins("[key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) planted C4 on [target.name] at ([target.x],[target.y],[target.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target.x];Y=[target.y];Z=[target.z]'>JMP</a>) with [timer] second fuse",0,1)
log_game("[key_name(user)] planted C4 on [target.name] at ([target.x],[target.y],[target.z]) with [timer] second fuse")
target.overlays += image('icons/obj/assemblies.dmi', "plastic-explosive2")
@@ -229,6 +229,8 @@
update_icon()
else
if(user.a_intent == "harm")
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
user.visible_message("\red [user.name] kicks \the [src]!", \
"\red You kick \the [src]!", \
"You hear glass crack.")
+7 -7
View File
@@ -49,21 +49,21 @@ proc/admin_proc()
NOTE: it checks usr! not src! So if you're checking somebody's rank in a proc which they did not call
you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
*/
/proc/check_rights(rights_required, show_msg=1)
if(usr && usr.client)
/proc/check_rights(rights_required, show_msg=1, var/mob/user = usr)
if(user && user.client)
if(rights_required)
if(usr.client.holder)
if(rights_required & usr.client.holder.rights)
if(user.client.holder)
if(rights_required & user.client.holder.rights)
return 1
else
if(show_msg)
usr << "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>"
user << "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>"
else
if(usr.client.holder)
if(user.client.holder)
return 1
else
if(show_msg)
usr << "<font color='red'>Error: You are not an admin.</font>"
user << "<font color='red'>Error: You are not an admin.</font>"
return 0
//probably a bit iffy - will hopefully figure out a better solution
+2
View File
@@ -500,6 +500,8 @@ datum/preferences
HTML += " <font color=green>\[Yes]</font>"
else
HTML += " <font color=red>\[No]</font>"
if(job.alt_titles)
HTML += "<br><b><a class='white' href=\"byond://?src=\ref[user];preference=job;task=alt_title;job=\ref[job]\">\[[GetPlayerAltTitle(job)]\]</a></b></td></tr>"
HTML += "</a></td></tr>"
continue
/*
@@ -6,11 +6,11 @@
if(I == r_store)
r_store = null
update_inv_pockets(0)
update_inv_pockets()
else if(I == l_store)
l_store = null
update_inv_pockets(0)
update_inv_pockets()
/mob/living/carbon/alien/humanoid/attack_ui(slot_id)
var/obj/item/W = get_active_hand()
@@ -118,7 +118,7 @@
wear_suit = null
if(I.flags_inv & HIDEJUMPSUIT)
update_inv_w_uniform()
update_inv_wear_suit(0)
update_inv_wear_suit()
else if(I == w_uniform)
if(r_store)
unEquip(r_store, 1) //Again, makes sense for pockets to drop.
@@ -129,69 +129,69 @@
if(belt)
unEquip(belt)
w_uniform = null
update_inv_w_uniform(0)
update_inv_w_uniform()
else if(I == gloves)
gloves = null
update_inv_gloves(0)
update_inv_gloves()
else if(I == glasses)
glasses = null
update_inv_glasses(0)
update_inv_glasses()
else if(I == head)
head = null
if(I.flags & BLOCKHAIR || I.flags & BLOCKHEADHAIR)
update_hair(0) //rebuild hair
update_inv_head(0)
update_hair() //rebuild hair
update_inv_head()
else if(I == r_ear)
r_ear = null
update_inv_ears(0)
update_inv_ears()
else if (I == l_ear)
l_ear = null
update_inv_ears(0)
update_inv_ears()
else if(I == shoes)
shoes = null
update_inv_shoes(0)
update_inv_shoes()
else if(I == belt)
belt = null
update_inv_belt(0)
update_inv_belt()
else if(I == wear_mask)
wear_mask = null
if(I.flags & BLOCKHAIR || I.flags & BLOCKHEADHAIR)
update_hair(0) //rebuild hair
update_hair() //rebuild hair
if(internal)
if(internals)
internals.icon_state = "internal0"
internal = null
update_inv_wear_mask(0)
update_inv_wear_mask()
else if(I == wear_id)
wear_id = null
update_inv_wear_id(0)
update_inv_wear_id()
else if(I == wear_pda)
wear_pda = null
update_inv_wear_pda(0)
update_inv_wear_pda()
else if(I == r_store)
r_store = null
update_inv_pockets(0)
update_inv_pockets()
else if(I == l_store)
l_store = null
update_inv_pockets(0)
update_inv_pockets()
else if(I == s_store)
s_store = null
update_inv_s_store(0)
update_inv_s_store()
else if(I == back)
back = null
update_inv_back(0)
update_inv_back()
else if(I == handcuffed)
handcuffed = null
update_inv_handcuffed(1)
update_inv_handcuffed()
else if(I == legcuffed)
legcuffed = null
update_inv_legcuffed(0)
update_inv_legcuffed()
else if(I == r_hand)
r_hand = null
update_inv_r_hand(0)
update_inv_r_hand()
else if(I == l_hand)
l_hand = null
update_inv_l_hand(0)
update_inv_l_hand()
update_action_buttons()
+1 -1
View File
@@ -13,7 +13,7 @@
return STATUS_CLOSE // By default no mob can do anything with NanoUI
/mob/dead/observer/can_use_topic()
if(check_rights(R_ADMIN, 0))
if(check_rights(R_ADMIN, 0, src))
return STATUS_INTERACTIVE // Admins are more equal
return STATUS_UPDATE // Ghosts can view updates