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()
@@ -39,8 +39,9 @@
src << "<span class='noticealien'>You begin to evolve!</span>"
for(var/mob/O in viewers(src, null))
O.show_message(text("<span class='alertalien'>[src] begins to twist and contort!</span>"), 1)
var/mob/living/carbon/alien/humanoid/queen/new_xeno = new (loc)
var/mob/living/carbon/alien/humanoid/queen/new_xeno = new(loc)
mind.transfer_to(new_xeno)
new_xeno.mind.name = new_xeno.name
del(src)
else
src << "<span class='notice'>We already have an alive queen.</span>"
@@ -81,11 +81,12 @@
src << "\green You begin to evolve!"
for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] begins to twist and contort!</B>"), 1)
var/mob/living/carbon/alien/humanoid/sentinel/praetorian/new_xeno = new (loc)
var/mob/living/carbon/alien/humanoid/sentinel/praetorian/new_xeno = new(loc)
if(mind)
mind.transfer_to(new_xeno)
else
new_xeno.key = key
new_xeno.mind.name = new_xeno.name
del(src)
return
@@ -123,11 +123,12 @@
src << "<span class='noticealien'>You begin to evolve!</span>"
for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] begins to twist and contort!</B>"), 1)
var/mob/living/carbon/alien/humanoid/empress/new_xeno = new (loc)
var/mob/living/carbon/alien/humanoid/empress/new_xeno = new(loc)
if(mind)
mind.transfer_to(new_xeno)
else
new_xeno.key = key
new_xeno.mind.name = new_xeno.name
del(src)
else
src << "<span class='notice'>We already have an alive empress.</span>"
@@ -52,6 +52,7 @@
mind.transfer_to(new_xeno)
else
new_xeno.key = key
new_xeno.mind.name = new_xeno.name
del(src)
return
else
@@ -99,6 +99,7 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
new_xeno.key = C.key
if(ticker && ticker.mode)
ticker.mode.xenos += new_xeno.mind
new_xeno.mind.name = new_xeno.name
new_xeno.mind.assigned_role = "MODE"
new_xeno.mind.special_role = "Alien"
new_xeno << sound('sound/voice/hiss5.ogg',0,0,0,100) //To get the player's attention
+3
View File
@@ -97,6 +97,7 @@
var/global/list/status_overlays_equipment
var/global/list/status_overlays_lighting
var/global/list/status_overlays_environ
var/indestructible = 0 // If set, prevents aliens from destroying it
/obj/machinery/power/apc/updateDialog()
if (stat & (BROKEN|MAINT))
@@ -667,6 +668,8 @@
return
if(!istype(user,/mob/living/carbon/alien/humanoid))
return
if(indestructible)
return
user.visible_message("\red [user.name] slashes at the [src.name]!", "\blue You slash at the [src.name]!")
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
+3 -3
View File
@@ -331,13 +331,13 @@
/obj/machinery/power/smes/attack_ai(mob/user)
add_fingerprint(user)
ui_interact(user)
/obj/machinery/power/smes/attack_hand(mob/user)
add_fingerprint(user)
ui_interact(user)
/obj/machinery/power/smes/attack_alien(mob/living/carbon/alien/humanoid/user)
return
/obj/machinery/power/smes/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
+1 -1
View File
@@ -1106,7 +1106,7 @@ datum/design/basic_capacitor
build_path = "/obj/item/weapon/stock_parts/capacitor"
datum/design/basic_sensor
name = "Basic Sensor Module"
name = "Basic Scanning Module"
desc = "A stock part used in the construction of various devices."
id = "basic_sensor"
req_tech = list("magnets" = 1)
+1 -1
View File
@@ -1 +1 @@
extended
xenos
+1 -1
View File
@@ -16,7 +16,7 @@
</script>
<script type='text/javascript' src='libraries.min.js'></script> <script type='text/javascript' src='nano_utility.js'></script> <script type='text/javascript' src='nano_template.js'></script> <script type='text/javascript' src='nano_state_manager.js'></script> <script type='text/javascript' src='nano_state.js'></script> <script type='text/javascript' src='nano_state_default.js'></script> <script type='text/javascript' src='nano_base_callbacks.js'></script> <script type='text/javascript' src='nano_base_helpers.js'></script> <link rel='stylesheet' type='text/css' href='shared.css'> <link rel='stylesheet' type='text/css' href='icons.css'> <link rel='stylesheet' type='text/css' href='layout_default.css'>
</head>
<body scroll=auto data-template-data='{"main":"pda.tmpl","layout":"layout_default.tmpl"}' data-url-parameters='{"src":"[0x2101574b]"}' data-initial-data='{"config":{"title":"Personal Data Assistant","srcObject":{"name":"PDA-Astor Wheeler (Blueshield)"},"stateKey":"default","status":2,"autoUpdateLayout":0,"autoUpdateContent":1,"showMap":0,"mapZLevel":1,"user":{"name":"Astor Wheeler"}},"data":{"owner":"Astor Wheeler","ownjob":"Blueshield","mode":0,"scanmode":0,"fon":1,"pai":0,"note":"Congratulations, your station has chosen the Thinktronic 5230 Personal Data Assistant!","silent":0,"toff":0,"active_conversation":null,"idInserted":0,"idLink":"--------","cart_loaded":1,"cartridge":{"access":{"access_security":1,"access_engine":0,"access_atmos":0,"access_medical":0,"access_clown":0,"access_mime":0,"access_janitor":1,"access_quartermaster":1,"access_hydroponics":0,"access_reagent_scanner":0,"access_remote_door":0,"access_status_display":1,"access_detonate_pda":0},"name":"HumanResources9001","radio":3},"stationTime":"12:13","newMessage":0,"messagescount":null,"messages":null}}'>
<body scroll=auto data-template-data='{"main":"escape_shuttle_control_console.tmpl","layout":"layout_default.tmpl"}' data-url-parameters='{"src":"[0x2101695f]"}' data-initial-data='{"config":{"title":"Shuttle Control","srcObject":{"name":"shuttle control console"},"stateKey":"default","status":2,"autoUpdateLayout":0,"autoUpdateContent":1,"showMap":0,"mapZLevel":1,"user":{"name":"Courtney Smail"}},"data":{"shuttle_status":"Standing-by at NCS Cyberiad.","shuttle_state":"idle","has_docking":1,"docking_status":"docked","docking_override":0,"can_launch":0,"can_cancel":0,"can_force":0,"auth_list":[{"auth_name":"","auth_hash":null},{"auth_name":"","auth_hash":null}],"has_auth":0,"user":null}}'>
<div id='uiLayout'>
</div>
<noscript>