Skip to content

Commit e648bb9

Browse files
committed
Alien bugfixes
1 parent aa40bf6 commit e648bb9

File tree

20 files changed

+129
-40
lines changed

20 files changed

+129
-40
lines changed

code/game/area/Space Station 13 areas.dm

+18-8
Original file line numberDiff line numberDiff line change
@@ -636,34 +636,44 @@ var/list/ghostteleportlocs = list()
636636
requires_power = 0
637637

638638
/area/xenos_station/southwest
639-
name = "\improper Aft Port Solars"
639+
name = "\improper Aft Port Solars Landing Area"
640640
icon_state = "southwest"
641641
requires_power = 0
642642

643643
/area/xenos_station/northwest
644-
name = "\improper Fore Port Solars"
644+
name = "\improper Fore Port Solars Landing Area"
645645
icon_state = "northwest"
646646
requires_power = 0
647647

648648
/area/xenos_station/northeast
649-
name = "\improper Fore Starboard Solars"
649+
name = "\improper Fore Starboard Solars Landing Area"
650650
icon_state = "northeast"
651651
requires_power = 0
652652

653653
/area/xenos_station/southeast
654-
name = "\improper Aft Starboard Solars"
654+
name = "\improper Aft Starboard Solars Landing Area"
655655
icon_state = "southeast"
656656
requires_power = 0
657657

658-
/area/xenos_station/north
658+
/area/xenos_station/east
659+
name = "\improper East Landing Area"
660+
icon_state = "east"
661+
requires_power = 0
662+
663+
/area/xenos_station/west
659664
name = "\improper West Landing Area"
665+
icon_state = "west"
666+
requires_power = 0
667+
668+
/area/xenos_station/researchoutpost
669+
name = "\improper Research Outpost Landing Area"
660670
icon_state = "north"
661671
requires_power = 0
662672

663-
/area/xenos_station/south
664-
name = "\improper East Landing Area"
673+
/area/xenos_station/miningoutpost
674+
name = "\improper Mining Outpost Landing Area"
665675
icon_state = "south"
666-
requires_power = 0
676+
requires_power = 0
667677

668678
//PRISON
669679
/area/prison

code/game/gamemodes/blob/blob.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ var/list/blob_nodes = list()
182182
return
183183

184184
if (2)
185-
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")
185+
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")
186186
set_security_level("gamma")
187187
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
188188
if(V && V.z == 1)

code/game/gamemodes/nuclear/nuclearbomb.dm

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ var/bomb_set
2929
var/uititle
3030
flags = FPRINT
3131
use_power = 0
32+
unacidable = 1
3233

3334
/obj/machinery/nuclearbomb/New()
3435
..()

code/game/gamemodes/xenos/xenos.dm

+55-6
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313
var/result = 0
1414
var/checkwin_counter = 0
1515
var/xenos_list = list()
16+
var/gammacalled = 0
1617

1718
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
1819
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
1920

2021
var/xenoai = 0 //Should the Xenos have their own AI?
2122
var/xenoborg = 0 //Should the Xenos have their own borg?
23+
var/gammaratio = 3 //At what alien to human ratio will the Gamma security level be called and the nuke be made available?
2224

2325
/datum/game_mode/xenos/announce()
2426
world << "<B>The current game mode is - Xenos!</B>"
@@ -87,6 +89,7 @@
8789
O.mind.original = O
8890
else
8991
O.key = xeno_mind.current.key
92+
9093
//del(xeno_mind)
9194
var/obj/loc_landmark
9295
for(var/obj/effect/landmark/start/sloc in landmarks_list)
@@ -101,6 +104,7 @@
101104
O.laws = new /datum/ai_laws/alienmov
102105
O.name = "Alien AI"
103106
O.real_name = name
107+
xeno_mind.name = O.name
104108
O.alienAI = 1
105109
O.network = list("SS13","Xeno")
106110
O.holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo3"))
@@ -115,6 +119,7 @@
115119
xeno_mind.transfer_to(O)
116120
else
117121
O.key = xeno_mind.current.key
122+
xeno_mind.name = O.name
118123
//del(xeno_mind)
119124
xenoqueen_selected = 1
120125
spawnpos++
@@ -135,6 +140,7 @@
135140
O.job = "Alien Cyborg"
136141
O.name = "Alien Cyborg"
137142
O.real_name = name
143+
xeno_mind.name = O.name
138144
O.module = new /obj/item/weapon/robot_module/alien/hunter(src)
139145
O.hands.icon_state = "standard"
140146
O.icon = 'icons/mob/alien.dmi'
@@ -156,6 +162,7 @@
156162
xeno_mind.transfer_to(O)
157163
else
158164
O.key = xeno_mind.current.key
165+
xeno_mind.name = O.name
159166
//del(xeno_mind)
160167
spawnpos++
161168

@@ -171,32 +178,52 @@
171178
ticker.mode.check_win()
172179
checkwin_counter = 0
173180
return 0
181+
174182

175183
/datum/game_mode/xenos/check_win()
176184
var/xenosalive = xenos_alive()
177185
var/playersalive = players_alive()
178-
if(emergency_shuttle && (emergency_shuttle.returned() || emergency_shuttle.departed))
186+
var/playeralienratio = player_alien_ratio()
187+
if(emergency_shuttle && emergency_shuttle.returned())
179188
return ..()
180189
if(!xenosalive)
181190
result = 1
182191
return 1
183192
else if(!playersalive)
184193
result = 2
185194
return 1
195+
else if(station_was_nuked)
196+
result = 3
197+
return 1
186198
else
199+
if(playeralienratio >= gammaratio && !gammacalled)
200+
gammacalled = 1
201+
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")
202+
set_security_level("gamma")
203+
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
204+
if(V && V.z == 1)
205+
V.locked = 0
206+
V.update_icon()
187207
return ..()
188208

189209
/datum/game_mode/xenos/check_finished()
190210
if(config.continous_rounds)
191211
if(result)
192212
return ..()
193-
if(emergency_shuttle && (emergency_shuttle.returned() || emergency_shuttle.departed))
213+
if(emergency_shuttle && emergency_shuttle.returned())
194214
return ..()
195-
if(result)
215+
if(result || station_was_nuked)
196216
return 1
197217
else
198218
return 0
199219

220+
/datum/game_mode/xenos/proc/get_nuke_code()
221+
var/nukecode = "ERROR"
222+
for(var/obj/machinery/nuclearbomb/bomb in world)
223+
if(bomb && bomb.r_code && bomb.z == 1)
224+
nukecode = bomb.r_code
225+
return nukecode
226+
200227
/datum/game_mode/xenos/proc/xenos_alive()
201228
var/list/livingxenos = list()
202229
for(var/datum/mind/xeno in xenos)
@@ -209,12 +236,30 @@
209236
var/list/livingplayers = list()
210237
for(var/mob/M in player_list)
211238
var/turf/T = get_turf(M)
212-
if((M) && (M.stat != 2) && M.client && T && (T.z == 1))
239+
if((M) && (M.stat != 2) && M.client && T && (T.z == 1 || emergency_shuttle.departed && (T.z == 1 || T.z == 2)))
213240
if(ishuman(M))
214241
livingplayers += 1
215242
return livingplayers.len
243+
244+
/datum/game_mode/xenos/proc/player_alien_ratio()
245+
var/list/livingplayers = list()
246+
var/list/livingxenos = list()
247+
for(var/mob/M in player_list)
248+
if((M) && (M.stat != 2) && M.client)
249+
if(ishuman(M))
250+
livingplayers += 1
251+
for(var/datum/mind/xeno in xenos)
252+
if((xeno) && (xeno.current) && (xeno.current.stat != 2) && (xeno.current.client))
253+
if(istype(xeno.current,/mob/living/carbon/alien) || (xenoborg && isrobot(xeno.current)) || (xenoai && isAI(xeno.current)))
254+
livingxenos += xeno
216255

217-
/datum/game_mode/xenos/declare_completion()
256+
if(!livingxenos.len || !livingplayers.len)
257+
return 0
258+
259+
var/ratio = livingxenos.len / livingplayers.len
260+
return ratio
261+
262+
/datum/game_mode/xenos/declare_completion()
218263
if(result == 1)
219264
feedback_set_details("round_end_result","win - xenos killed")
220265
world << "<FONT size = 3><B>Crew Victory</B></FONT>"
@@ -223,6 +268,10 @@
223268
feedback_set_details("round_end_result","win - crew killed")
224269
world << "<FONT size = 3><B>Alien Victory</B></FONT>"
225270
world << "<B>The aliens were successful and slaughtered the crew!</B>"
271+
else if(station_was_nuked)
272+
feedback_set_details("round_end_result","win - xenos nuked")
273+
world << "<FONT size = 3><B>Crew Victory</B></FONT>"
274+
world << "<B>The station was destroyed in a nuclear explosion, preventing the aliens from overrunning it!</B>"
226275
else
227276
feedback_set_details("round_end_result","win - crew escaped")
228277
world << "<FONT size = 3><B>Draw</B></FONT>"
@@ -231,7 +280,7 @@
231280
var/text = "<br><FONT size=3><B>There were [xenos.len] aliens.</B></FONT>"
232281
text += "<br><FONT size=3><B>The aliens were:</B></FONT>"
233282
for(var/datum/mind/xeno in xenos)
234-
text += "<br><b>[xeno.key]</b> was <b>[xeno.current.name]</b> ("
283+
text += "<br><b>[xeno.key]</b> was <b>[xeno.name]</b> ("
235284
if(xeno.current)
236285
if(xeno.current.stat == DEAD)
237286
text += "died"

code/game/jobs/job/supervisor.dm

+4-4
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@
246246
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
247247
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
248248
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
249-
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway)
250-
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_lawyer)
249+
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_magistrate)
250+
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_lawyer, access_magistrate)
251251

252252
equip(var/mob/living/carbon/human/H)
253253
if(!H) return 0
@@ -279,8 +279,8 @@
279279
spawn_positions = 2
280280
supervisors = "the magistrate"
281281
selection_color = "#ddddff"
282-
access = list(access_lawyer, access_court, access_sec_doors, access_maint_tunnels, access_magistrate)
283-
minimal_access = list(access_lawyer, access_court, access_sec_doors, access_maint_tunnels, access_magistrate)
282+
access = list(access_lawyer, access_court, access_sec_doors, access_maint_tunnels)
283+
minimal_access = list(access_lawyer, access_court, access_sec_doors, access_maint_tunnels)
284284
alt_titles = list("Lawyer","Public Defender")
285285
minimal_player_age = 21
286286

code/game/machinery/OpTable.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373

7474

7575
/obj/machinery/optable/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
76-
if(usr.stat || !ishuman(usr) || usr.restrained() || !check_table(usr))
76+
if(usr.stat || !ishuman(usr) || usr.restrained() || !check_table(usr) || usr.weakened || usr.stunned)
7777
return
7878

7979
var/mob/living/L = O

code/game/machinery/bots/secbot.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ Auto Patrol: []"},
247247
var/area/location = get_area(src)
248248
speak("[arrest_type ? "Detaining" : "Arresting"] level [threatlevel] scumbag <b>[target]</b> in [location].",radio_frequency, radio_name)
249249
target.visible_message("<span class='danger'>[target] has been [harmbaton ? "beaten" : "stunned"] by [src]!</span>",\
250-
"<span class='userdanger'>[target] has been [harmbaton ? "beaten" : "unlocked"] by [src]!</span>")
250+
"<span class='userdanger'>[target] has been [harmbaton ? "beaten" : "stunned"] by [src]!</span>")
251251

252252
mode = BOT_PREP_ARREST
253253
anchored = 1

code/game/machinery/camera/camera.dm

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
var/light_disabled = 0
2929
var/alarm_on = 0
3030
var/busy = 0
31+
var/indestructible = 0 // If set, prevents aliens from destroying it
3132

3233
/obj/machinery/camera/New()
3334
wires = new(src)
@@ -97,6 +98,8 @@
9798
/obj/machinery/camera/attack_paw(mob/living/carbon/alien/humanoid/user as mob)
9899
if(!istype(user))
99100
return
101+
if(indestructible)
102+
return
100103
status = 0
101104
visible_message("<span class='warning'>\The [user] slashes at [src]!</span>")
102105
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)

code/game/machinery/computer/xenos_shuttle.dm

+12-10
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
var/area/curr_location
1010
var/moving = 0
1111
var/lastMove = 0
12+
unacidable = 1
1213

1314

1415
/obj/machinery/computer/xenos_station/New()
@@ -26,9 +27,8 @@
2627

2728
for(var/obj/machinery/door/airlock/alien/A in world)
2829
A.close()
29-
if(dest_location == locate(/area/xenos_station/start))
30-
A.locked = 1
31-
A.update_icon()
30+
A.locked = 1
31+
A.update_icon()
3232

3333
for(var/mob/M in curr_location)
3434
if(M.client)
@@ -109,11 +109,12 @@
109109
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>
110110
<a href='?src=\ref[src];xenos=1'>Alien Space</a><br>
111111
<a href='?src=\ref[src];station_nw=1'>North-West of SS13</a> |
112-
<a href='?src=\ref[src];station_n=1'>North of SS13</a> |
113112
<a href='?src=\ref[src];station_ne=1'>North-East of SS13</a><br>
113+
<a href='?src=\ref[src];station_e=1'>East of SS13</a> <br>
114114
<a href='?src=\ref[src];station_sw=1'>South-West of SS13</a> |
115-
<a href='?src=\ref[src];station_s=1'>South of SS13</a> |
116115
<a href='?src=\ref[src];station_se=1'>South-East of SS13</a><br>
116+
<a href='?src=\ref[src];station_west=1'>West of SS13</a><br>
117+
<a href='?src=\ref[src];station_ro=1'>North of Research Outpost</a><br>
117118
<a href='?src=\ref[user];mach_close=computer'>Close</a>"}
118119

119120
user << browse(dat, "window=computer;size=575x450")
@@ -132,17 +133,18 @@
132133
xenos_move_to(/area/xenos_station/start)
133134
else if(href_list["station_nw"])
134135
xenos_move_to(/area/xenos_station/northwest)
135-
else if(href_list["station_n"])
136-
xenos_move_to(/area/xenos_station/north)
137136
else if(href_list["station_ne"])
138137
xenos_move_to(/area/xenos_station/northeast)
138+
else if(href_list["station_e"])
139+
xenos_move_to(/area/xenos_station/east)
139140
else if(href_list["station_sw"])
140141
xenos_move_to(/area/xenos_station/southwest)
141-
else if(href_list["station_s"])
142-
xenos_move_to(/area/xenos_station/south)
143142
else if(href_list["station_se"])
144143
xenos_move_to(/area/xenos_station/southeast)
145-
144+
else if(href_list["station_w"])
145+
xenos_move_to(/area/xenos_station/west)
146+
else if(href_list["station_ro"])
147+
xenos_move_to(/area/xenos_station/researchoutpost)
146148

147149
add_fingerprint(usr)
148150
updateUsrDialog()

code/game/objects/effects/aliens.dm

+16
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,21 @@
166166
connected_weeds = new()
167167
..(src.loc, src)
168168

169+
/obj/effect/alien/weeds/node/Destroy()
170+
for(var/obj/effect/alien/weeds/W in connected_weeds)
171+
processing_objects.Add(W) // Start processing the weeds so they lose health when there's no connected node
172+
..()
173+
174+
/obj/effect/alien/weeds/process()
175+
if(!linked_node || (get_dist(linked_node, src) > linked_node.node_range))
176+
if(prob(50))
177+
health -= 1
178+
else if(prob(50))
179+
health -= 2
180+
else if(prob(25))
181+
health -= 3
182+
healthcheck()
183+
169184
/obj/effect/alien/weeds/New(pos, var/obj/effect/alien/weeds/node/N)
170185
..()
171186

@@ -187,6 +202,7 @@
187202
if(linked_node)
188203
linked_node.connected_weeds.Remove(src)
189204
linked_node = null
205+
processing_objects.Remove(src)
190206
..()
191207

192208
/obj/effect/alien/weeds/proc/Life()

code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@
3939
src << "<span class='noticealien'>You begin to evolve!</span>"
4040
for(var/mob/O in viewers(src, null))
4141
O.show_message(text("<span class='alertalien'>[src] begins to twist and contort!</span>"), 1)
42-
var/mob/living/carbon/alien/humanoid/queen/new_xeno = new (loc)
42+
var/mob/living/carbon/alien/humanoid/queen/new_xeno = new(loc)
4343
mind.transfer_to(new_xeno)
44+
new_xeno.mind.name = new_xeno.name
4445
del(src)
4546
else
4647
src << "<span class='notice'>We already have an alive queen.</span>"

0 commit comments

Comments
 (0)