Alien bugfixes

This commit is contained in:
Markolie
2014-12-15 12:04:30 +01:00
parent aa40bf6bbe
commit e648bb959e
20 changed files with 129 additions and 40 deletions
+18 -8
View File
@@ -636,34 +636,44 @@ var/list/ghostteleportlocs = list()
requires_power = 0
/area/xenos_station/southwest
name = "\improper Aft Port Solars"
name = "\improper Aft Port Solars Landing Area"
icon_state = "southwest"
requires_power = 0
/area/xenos_station/northwest
name = "\improper Fore Port Solars"
name = "\improper Fore Port Solars Landing Area"
icon_state = "northwest"
requires_power = 0
/area/xenos_station/northeast
name = "\improper Fore Starboard Solars"
name = "\improper Fore Starboard Solars Landing Area"
icon_state = "northeast"
requires_power = 0
/area/xenos_station/southeast
name = "\improper Aft Starboard Solars"
name = "\improper Aft Starboard Solars Landing Area"
icon_state = "southeast"
requires_power = 0
/area/xenos_station/north
/area/xenos_station/east
name = "\improper East Landing Area"
icon_state = "east"
requires_power = 0
/area/xenos_station/west
name = "\improper West Landing Area"
icon_state = "west"
requires_power = 0
/area/xenos_station/researchoutpost
name = "\improper Research Outpost Landing Area"
icon_state = "north"
requires_power = 0
/area/xenos_station/south
name = "\improper East Landing Area"
/area/xenos_station/miningoutpost
name = "\improper Mining Outpost Landing Area"
icon_state = "south"
requires_power = 0
requires_power = 0
//PRISON
/area/prison
+1 -1
View File
@@ -182,7 +182,7 @@ var/list/blob_nodes = list()
return
if (2)
command_alert("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to mantain quarantine. The Nuclear Authentication Code is [get_nuke_code()] ", "Biohazard Alert")
command_alert("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to maintain quarantine. The Nuclear Authentication Code is [get_nuke_code()] ", "Biohazard Alert")
set_security_level("gamma")
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
if(V && V.z == 1)
@@ -29,6 +29,7 @@ var/bomb_set
var/uititle
flags = FPRINT
use_power = 0
unacidable = 1
/obj/machinery/nuclearbomb/New()
..()
+55 -6
View File
@@ -13,12 +13,14 @@
var/result = 0
var/checkwin_counter = 0
var/xenos_list = list()
var/gammacalled = 0
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
var/xenoai = 0 //Should the Xenos have their own AI?
var/xenoborg = 0 //Should the Xenos have their own borg?
var/gammaratio = 3 //At what alien to human ratio will the Gamma security level be called and the nuke be made available?
/datum/game_mode/xenos/announce()
world << "<B>The current game mode is - Xenos!</B>"
@@ -87,6 +89,7 @@
O.mind.original = O
else
O.key = xeno_mind.current.key
//del(xeno_mind)
var/obj/loc_landmark
for(var/obj/effect/landmark/start/sloc in landmarks_list)
@@ -101,6 +104,7 @@
O.laws = new /datum/ai_laws/alienmov
O.name = "Alien AI"
O.real_name = name
xeno_mind.name = O.name
O.alienAI = 1
O.network = list("SS13","Xeno")
O.holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo3"))
@@ -115,6 +119,7 @@
xeno_mind.transfer_to(O)
else
O.key = xeno_mind.current.key
xeno_mind.name = O.name
//del(xeno_mind)
xenoqueen_selected = 1
spawnpos++
@@ -135,6 +140,7 @@
O.job = "Alien Cyborg"
O.name = "Alien Cyborg"
O.real_name = name
xeno_mind.name = O.name
O.module = new /obj/item/weapon/robot_module/alien/hunter(src)
O.hands.icon_state = "standard"
O.icon = 'icons/mob/alien.dmi'
@@ -156,6 +162,7 @@
xeno_mind.transfer_to(O)
else
O.key = xeno_mind.current.key
xeno_mind.name = O.name
//del(xeno_mind)
spawnpos++
@@ -171,11 +178,13 @@
ticker.mode.check_win()
checkwin_counter = 0
return 0
/datum/game_mode/xenos/check_win()
var/xenosalive = xenos_alive()
var/playersalive = players_alive()
if(emergency_shuttle && (emergency_shuttle.returned() || emergency_shuttle.departed))
var/playeralienratio = player_alien_ratio()
if(emergency_shuttle && emergency_shuttle.returned())
return ..()
if(!xenosalive)
result = 1
@@ -183,20 +192,38 @@
else if(!playersalive)
result = 2
return 1
else if(station_was_nuked)
result = 3
return 1
else
if(playeralienratio >= gammaratio && !gammacalled)
gammacalled = 1
command_alert("The aliens have nearly succeeded in capturing the station and exterminating the crew. Activate the nuclear failsafe to stop the alien threat once and for all. The Nuclear Authentication Code is [get_nuke_code()] ", "Alien Lifeform Alert")
set_security_level("gamma")
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
if(V && V.z == 1)
V.locked = 0
V.update_icon()
return ..()
/datum/game_mode/xenos/check_finished()
if(config.continous_rounds)
if(result)
return ..()
if(emergency_shuttle && (emergency_shuttle.returned() || emergency_shuttle.departed))
if(emergency_shuttle && emergency_shuttle.returned())
return ..()
if(result)
if(result || station_was_nuked)
return 1
else
return 0
/datum/game_mode/xenos/proc/get_nuke_code()
var/nukecode = "ERROR"
for(var/obj/machinery/nuclearbomb/bomb in world)
if(bomb && bomb.r_code && bomb.z == 1)
nukecode = bomb.r_code
return nukecode
/datum/game_mode/xenos/proc/xenos_alive()
var/list/livingxenos = list()
for(var/datum/mind/xeno in xenos)
@@ -209,12 +236,30 @@
var/list/livingplayers = list()
for(var/mob/M in player_list)
var/turf/T = get_turf(M)
if((M) && (M.stat != 2) && M.client && T && (T.z == 1))
if((M) && (M.stat != 2) && M.client && T && (T.z == 1 || emergency_shuttle.departed && (T.z == 1 || T.z == 2)))
if(ishuman(M))
livingplayers += 1
return livingplayers.len
/datum/game_mode/xenos/proc/player_alien_ratio()
var/list/livingplayers = list()
var/list/livingxenos = list()
for(var/mob/M in player_list)
if((M) && (M.stat != 2) && M.client)
if(ishuman(M))
livingplayers += 1
for(var/datum/mind/xeno in xenos)
if((xeno) && (xeno.current) && (xeno.current.stat != 2) && (xeno.current.client))
if(istype(xeno.current,/mob/living/carbon/alien) || (xenoborg && isrobot(xeno.current)) || (xenoai && isAI(xeno.current)))
livingxenos += xeno
/datum/game_mode/xenos/declare_completion()
if(!livingxenos.len || !livingplayers.len)
return 0
var/ratio = livingxenos.len / livingplayers.len
return ratio
/datum/game_mode/xenos/declare_completion()
if(result == 1)
feedback_set_details("round_end_result","win - xenos killed")
world << "<FONT size = 3><B>Crew Victory</B></FONT>"
@@ -223,6 +268,10 @@
feedback_set_details("round_end_result","win - crew killed")
world << "<FONT size = 3><B>Alien Victory</B></FONT>"
world << "<B>The aliens were successful and slaughtered the crew!</B>"
else if(station_was_nuked)
feedback_set_details("round_end_result","win - xenos nuked")
world << "<FONT size = 3><B>Crew Victory</B></FONT>"
world << "<B>The station was destroyed in a nuclear explosion, preventing the aliens from overrunning it!</B>"
else
feedback_set_details("round_end_result","win - crew escaped")
world << "<FONT size = 3><B>Draw</B></FONT>"
@@ -231,7 +280,7 @@
var/text = "<br><FONT size=3><B>There were [xenos.len] aliens.</B></FONT>"
text += "<br><FONT size=3><B>The aliens were:</B></FONT>"
for(var/datum/mind/xeno in xenos)
text += "<br><b>[xeno.key]</b> was <b>[xeno.current.name]</b> ("
text += "<br><b>[xeno.key]</b> was <b>[xeno.name]</b> ("
if(xeno.current)
if(xeno.current.stat == DEAD)
text += "died"
+4 -4
View File
@@ -246,8 +246,8 @@
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway)
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_lawyer)
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_magistrate)
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_lawyer, access_magistrate)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
@@ -279,8 +279,8 @@
spawn_positions = 2
supervisors = "the magistrate"
selection_color = "#ddddff"
access = list(access_lawyer, access_court, access_sec_doors, access_maint_tunnels, access_magistrate)
minimal_access = list(access_lawyer, access_court, access_sec_doors, access_maint_tunnels, access_magistrate)
access = list(access_lawyer, access_court, access_sec_doors, access_maint_tunnels)
minimal_access = list(access_lawyer, access_court, access_sec_doors, access_maint_tunnels)
alt_titles = list("Lawyer","Public Defender")
minimal_player_age = 21
+1 -1
View File
@@ -73,7 +73,7 @@
/obj/machinery/optable/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
if(usr.stat || !ishuman(usr) || usr.restrained() || !check_table(usr))
if(usr.stat || !ishuman(usr) || usr.restrained() || !check_table(usr) || usr.weakened || usr.stunned)
return
var/mob/living/L = O
+1 -1
View File
@@ -247,7 +247,7 @@ Auto Patrol: []"},
var/area/location = get_area(src)
speak("[arrest_type ? "Detaining" : "Arresting"] level [threatlevel] scumbag <b>[target]</b> in [location].",radio_frequency, radio_name)
target.visible_message("<span class='danger'>[target] has been [harmbaton ? "beaten" : "stunned"] by [src]!</span>",\
"<span class='userdanger'>[target] has been [harmbaton ? "beaten" : "unlocked"] by [src]!</span>")
"<span class='userdanger'>[target] has been [harmbaton ? "beaten" : "stunned"] by [src]!</span>")
mode = BOT_PREP_ARREST
anchored = 1
+3
View File
@@ -28,6 +28,7 @@
var/light_disabled = 0
var/alarm_on = 0
var/busy = 0
var/indestructible = 0 // If set, prevents aliens from destroying it
/obj/machinery/camera/New()
wires = new(src)
@@ -97,6 +98,8 @@
/obj/machinery/camera/attack_paw(mob/living/carbon/alien/humanoid/user as mob)
if(!istype(user))
return
if(indestructible)
return
status = 0
visible_message("<span class='warning'>\The [user] slashes at [src]!</span>")
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
+12 -10
View File
@@ -9,6 +9,7 @@
var/area/curr_location
var/moving = 0
var/lastMove = 0
unacidable = 1
/obj/machinery/computer/xenos_station/New()
@@ -26,9 +27,8 @@
for(var/obj/machinery/door/airlock/alien/A in world)
A.close()
if(dest_location == locate(/area/xenos_station/start))
A.locked = 1
A.update_icon()
A.locked = 1
A.update_icon()
for(var/mob/M in curr_location)
if(M.client)
@@ -109,11 +109,12 @@
Ready to move[max(lastMove + XENOS_SHUTTLE_COOLDOWN - world.time, 0) ? " in [max(round((lastMove + XENOS_SHUTTLE_COOLDOWN - world.time) * 0.1), 0)] seconds" : ": now"]<br>
<a href='?src=\ref[src];xenos=1'>Alien Space</a><br>
<a href='?src=\ref[src];station_nw=1'>North-West of SS13</a> |
<a href='?src=\ref[src];station_n=1'>North of SS13</a> |
<a href='?src=\ref[src];station_ne=1'>North-East of SS13</a><br>
<a href='?src=\ref[src];station_e=1'>East of SS13</a> <br>
<a href='?src=\ref[src];station_sw=1'>South-West of SS13</a> |
<a href='?src=\ref[src];station_s=1'>South of SS13</a> |
<a href='?src=\ref[src];station_se=1'>South-East of SS13</a><br>
<a href='?src=\ref[src];station_west=1'>West of SS13</a><br>
<a href='?src=\ref[src];station_ro=1'>North of Research Outpost</a><br>
<a href='?src=\ref[user];mach_close=computer'>Close</a>"}
user << browse(dat, "window=computer;size=575x450")
@@ -132,17 +133,18 @@
xenos_move_to(/area/xenos_station/start)
else if(href_list["station_nw"])
xenos_move_to(/area/xenos_station/northwest)
else if(href_list["station_n"])
xenos_move_to(/area/xenos_station/north)
else if(href_list["station_ne"])
xenos_move_to(/area/xenos_station/northeast)
else if(href_list["station_e"])
xenos_move_to(/area/xenos_station/east)
else if(href_list["station_sw"])
xenos_move_to(/area/xenos_station/southwest)
else if(href_list["station_s"])
xenos_move_to(/area/xenos_station/south)
else if(href_list["station_se"])
xenos_move_to(/area/xenos_station/southeast)
else if(href_list["station_w"])
xenos_move_to(/area/xenos_station/west)
else if(href_list["station_ro"])
xenos_move_to(/area/xenos_station/researchoutpost)
add_fingerprint(usr)
updateUsrDialog()
+16
View File
@@ -166,6 +166,21 @@
connected_weeds = new()
..(src.loc, src)
/obj/effect/alien/weeds/node/Destroy()
for(var/obj/effect/alien/weeds/W in connected_weeds)
processing_objects.Add(W) // Start processing the weeds so they lose health when there's no connected node
..()
/obj/effect/alien/weeds/process()
if(!linked_node || (get_dist(linked_node, src) > linked_node.node_range))
if(prob(50))
health -= 1
else if(prob(50))
health -= 2
else if(prob(25))
health -= 3
healthcheck()
/obj/effect/alien/weeds/New(pos, var/obj/effect/alien/weeds/node/N)
..()
@@ -187,6 +202,7 @@
if(linked_node)
linked_node.connected_weeds.Remove(src)
linked_node = null
processing_objects.Remove(src)
..()
/obj/effect/alien/weeds/proc/Life()