Skip to content

Commit 26fadd1

Browse files
committed
Merge pull request #4 from ZomgPonies/master
fg
2 parents 54c9f9c + 933a14e commit 26fadd1

File tree

38 files changed

+431
-185
lines changed

38 files changed

+431
-185
lines changed

Diff for: baystation12.dme

+1
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@
249249
#include "code\game\gamemodes\mutiny\directives\research_to_ripleys_directive.dm"
250250
#include "code\game\gamemodes\mutiny\directives\tau_ceti_needs_women_directive.dm"
251251
#include "code\game\gamemodes\mutiny\directives\terminations_directive.dm"
252+
#include "code\game\gamemodes\mutiny\directives\vox_heist.dm"
252253
#include "code\game\gamemodes\nations\flag_pinpointer.dm"
253254
#include "code\game\gamemodes\nations\flagprocs.dm"
254255
#include "code\game\gamemodes\nations\nationdatums.dm"

Diff for: code/controllers/emergency_shuttle_controller.dm

+8-4
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
6363

6464
//calls the shuttle for an emergency evacuation
6565
/datum/emergency_shuttle_controller/proc/call_evac()
66-
if(!can_call()) return
66+
if(!can_call()) return 0
6767

6868
//set the launch timer
6969
autopilot = 1
@@ -80,6 +80,8 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
8080
if(istype(A, /area/hallway))
8181
A.readyalert()
8282

83+
return 1
84+
8385
//calls the shuttle for a routine crew transfer
8486
/datum/emergency_shuttle_controller/proc/call_transfer()
8587
if(!can_call()) return
@@ -134,8 +136,10 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
134136
return 1
135137

136138
/datum/emergency_shuttle_controller/proc/get_shuttle_prep_time()
137-
// During mutiny rounds, the shuttle takes twice as long.
138-
if(ticker && istype(ticker.mode,/datum/game_mode/mutiny))
139+
// During mutiny rounds, the shuttle takes longer. Unless of course the directive is finished.
140+
if(!ticker) return SHUTTLE_PREPTIME
141+
var/datum/game_mode/mutiny/m = ticker.mode
142+
if(istype(m) && !m.ead.activated)
139143
return SHUTTLE_PREPTIME * 3 //15 minutes
140144

141145
return SHUTTLE_PREPTIME
@@ -261,4 +265,4 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
261265
var/obj/effect/bgstar/S = new/obj/effect/bgstar(locate(x,y,z))
262266
S.direction = spawndir
263267
spawn()
264-
S.startmove()
268+
S.startmove()

Diff for: code/datums/mind.dm

+1-15
Original file line numberDiff line numberDiff line change
@@ -1257,18 +1257,7 @@ datum/mind
12571257
brigged_since = -1
12581258
return 0
12591259

1260-
var/is_currently_brigged = 0
1261-
1262-
if(istype(T.loc,/area/security/brig))
1263-
is_currently_brigged = 1
1264-
for(var/obj/item/weapon/card/id/card in current)
1265-
is_currently_brigged = 0
1266-
break // if they still have ID they're not brigged
1267-
for(var/obj/item/device/pda/P in current)
1268-
if(P.id)
1269-
is_currently_brigged = 0
1270-
break // if they still have ID they're not brigged
1271-
1260+
var/is_currently_brigged = current.is_in_brig()
12721261
if(!is_currently_brigged)
12731262
brigged_since = -1
12741263
return 0
@@ -1278,9 +1267,6 @@ datum/mind
12781267

12791268
return (duration <= world.time - brigged_since)
12801269

1281-
1282-
1283-
12841270
//Initialisation procs
12851271
/mob/proc/mind_initialize()
12861272
if(mind)

Diff for: code/game/gamemodes/mutiny/directives/vox_heist.dm

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
datum/directive/vox_heist
2+
var/list/vox = list()
3+
var/list/sympathizers = list()
4+
5+
proc/get_vox_candidates()
6+
var/list/candidates[0]
7+
for(var/mob/M in player_list)
8+
if(M.is_ready() && is_vox(M))
9+
candidates.Add(M)
10+
return candidates
11+
12+
proc/get_sympathizer_candidates()
13+
var/list/candidates[0]
14+
for(var/mob/M in player_list)
15+
if(M.is_ready() && !is_vox(M) && !M.is_mechanical() && M.mind.assigned_role != "Captain")
16+
candidates[M] = get_weight(M)
17+
return candidates
18+
19+
proc/is_vox(mob/M)
20+
return M.get_species() == "Vox"
21+
22+
proc/get_weight(mob/M)
23+
// You will have a high chance of being regarded as a vox sympathizer if your
24+
// relationship with NanoTrasen is negative. Otherwise, command and security
25+
// staff are pretty well trusted and maltreated alien races are easy suspects.
26+
var/relation = M.client.prefs.nanotrasen_relation
27+
if(relation == "Opposed")
28+
return 8
29+
if(relation == "Skeptical")
30+
return 5
31+
if(command_positions.Find(M.mind.assigned_role))
32+
return 1
33+
var/species = M.get_species()
34+
if(species == "Tajaran" || species == "Unathi")
35+
return 5
36+
if(security_positions.Find(M.mind.assigned_role))
37+
return 2
38+
return 3
39+
40+
datum/directive/vox_heist/get_description()
41+
return {"
42+
<p>
43+
A vox warship has commandeered a NanoTrasen transport carrying 2,500 cubic meters of liquid plasma.
44+
The raiders are willing to return the stolen cargo in exchange for the capture or execution of so-called "vox pariah" that are stationed aboard [station_name()].
45+
If the transport is not recovered, the estimated loss of profits is a threat to the solvency of the company.
46+
Predictive analysis has identified certain members of the crew as sympathetic to the vox pariah. Detain the sympathizers to guarantee a successful exchange.
47+
Lethal force is authorized by the High Command Department of Security. Further information is classified.
48+
</p>
49+
"}
50+
51+
datum/directive/vox_heist/initialize()
52+
var/list/vox_candidates = get_vox_candidates()
53+
for(var/mob/pariah in vox_candidates)
54+
vox.Add(pariah.mind)
55+
56+
special_orders = list(
57+
"Brig or kill all Vox Pariah.")
58+
59+
var/list/sympathizer_candidates = get_sympathizer_candidates()
60+
var/list/sympathizer_names = list()
61+
var/sympathizer_count = min(rand(2,4), sympathizer_candidates.len)
62+
for(var/i=0, i < sympathizer_count, i++)
63+
if(!sympathizer_candidates.len)
64+
break
65+
66+
var/mob/candidate = pickweight(sympathizer_candidates)
67+
sympathizer_candidates.Remove(candidate)
68+
sympathizers.Add(candidate.mind)
69+
sympathizer_names.Add("[candidate.mind.assigned_role] [candidate.mind.name]")
70+
71+
if(sympathizers.len)
72+
special_orders.Add("Brig the following sympathizers: [list2text(sympathizer_names, ", ")]")
73+
74+
datum/directive/vox_heist/meets_prerequisites()
75+
var/list/candidates = get_vox_candidates()
76+
return candidates.len >= 2
77+
78+
datum/directive/vox_heist/directives_complete()
79+
if(!vox.len && !sympathizers.len)
80+
return 1
81+
82+
for(var/datum/mind/pariah in vox)
83+
if(!pariah.current.is_in_brig())
84+
return 0
85+
86+
for(var/datum/mind/sympathizer in sympathizers)
87+
if(!sympathizer.current.is_in_brig())
88+
return 0
89+
90+
return 1
91+
92+
datum/directive/vox_heist/get_remaining_orders()
93+
var/text = ""
94+
for(var/datum/mind/pariah in vox)
95+
if(!pariah.current.is_in_brig())
96+
text += "<li>Brig or Kill [pariah]</li>"
97+
for(var/datum/mind/sympathizer in sympathizers)
98+
if(!sympathizer.current.is_in_brig())
99+
text += "<li>Brig [sympathizer]</li>"
100+
return text
101+
102+
/hook/death/proc/vox_or_sympathizer_killed(mob/living/carbon/human/deceased, gibbed)
103+
var/datum/directive/vox_heist/D = get_directive("vox_heist")
104+
if(!D) return 1
105+
106+
var/datum/mind/M = deceased.mind
107+
if(M in D.vox)
108+
D.vox.Remove(M)
109+
if(M in D.sympathizers)
110+
D.sympathizers.Remove(M)
111+
return 1

Diff for: code/game/gamemodes/mutiny/emergency_authentication_device.dm

+8
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@
3737
else
3838
return "Inactive"
3939

40+
proc/launch_shuttle()
41+
spawn(rand(5 SECONDS, 45 SECONDS))
42+
if(emergency_shuttle.call_evac())
43+
spawn(20 SECONDS)
44+
var/text = "[station_name()], we have confirmed your completion of Directive X. An evacuation shuttle is en route to receive your crew for debriefing."
45+
command_alert(text, "Emergency Transmission")
46+
4047
/obj/machinery/emergency_authentication_device/attack_hand(mob/user)
4148
if(activated)
4249
user << "\blue \The [src] is already active!"
@@ -51,6 +58,7 @@
5158
activated = 1
5259
user << "\blue You activate \the [src]!"
5360
state("Command acknowledged. Initiating quantum entanglement relay to NanoTrasen High Command.")
61+
launch_shuttle()
5462
return
5563

5664
if(!captains_key && !secondary_key)

Diff for: code/game/gamemodes/mutiny/mutiny.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ datum/game_mode/mutiny
193193

194194
proc/unbolt_vault_door()
195195
var/obj/machinery/door/airlock/vault = locate(/obj/machinery/door/airlock/vault)
196-
vault.lock()
196+
vault.unlock(1)
197197

198198
proc/make_secret_transcript()
199199
var/obj/machinery/computer/telecomms/server/S = locate(/obj/machinery/computer/telecomms/server)

Diff for: code/game/jobs/job/supervisor.dm

+1
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@
284284
access = list(access_lawyer, access_court, access_sec_doors, access_maint_tunnels)
285285
minimal_access = list(access_lawyer, access_court, access_sec_doors, access_maint_tunnels)
286286
alt_titles = list("Lawyer","Public Defender")
287+
minimal_player_age = 21
287288

288289
equip(var/mob/living/carbon/human/H)
289290
if(!H) return 0

Diff for: code/game/jobs/job/support.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
H.equip_or_collect(new /obj/item/clothing/under/rank/miner(H), slot_w_uniform)
183183
H.equip_or_collect(new /obj/item/device/pda/shaftminer(H), slot_wear_pda)
184184
H.equip_or_collect(new /obj/item/clothing/shoes/black(H), slot_shoes)
185-
H.equip_or_collect(new /obj/item/weapon/pickaxe/drill(H), slot_r_hand)
185+
H.equip_or_collect(new /obj/item/weapon/pickaxe/drill(H), slot_belt)
186186
// H.equip_or_collect(new /obj/item/clothing/gloves/black(H), slot_gloves)
187187
if(H.backbag == 1)
188188
H.equip_or_collect(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)

Diff for: code/game/machinery/kitchen/smartfridge.dm

+35-3
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696

9797
nanomanager.update_uis(src)
9898

99-
else if(istype(O, /obj/item/weapon/storage/bag/plants))
99+
else if(istype(O, /obj/item/weapon/storage/bag/plants) || istype(O, /obj/item/weapon/storage/belt/medical))
100100
var/obj/item/weapon/storage/bag/plants/P = O
101101
var/plants_loaded = 0
102102
for(var/obj/G in P.contents)
@@ -121,6 +121,7 @@
121121

122122
nanomanager.update_uis(src)
123123

124+
124125
else
125126
user << "<span class='notice'>\The [src] smartly refuses [O].</span>"
126127
return 1
@@ -138,6 +139,39 @@
138139

139140
ui_interact(user)
140141

142+
//Drag pill bottle to fridge to empty it into the fridge
143+
/obj/machinery/smartfridge/MouseDrop_T(obj/over_object as obj, mob/user as mob)
144+
if(!istype(over_object, /obj/item/weapon/storage/pill_bottle)) //Only pill bottles, please
145+
return
146+
147+
if(!src.ispowered)
148+
user << "<span class='notice'>\The [src] is unpowered and useless.</span>"
149+
return
150+
151+
var/obj/item/weapon/storage/box/pillbottles/P = over_object
152+
var/items_loaded = 0
153+
for(var/obj/G in P.contents)
154+
if(accept_check(G))
155+
if(contents.len >= max_n_of_items)
156+
user << "<span class='notice'>\The [src] is full.</span>"
157+
return 1
158+
else
159+
P.remove_from_storage(G,src)
160+
if(item_quants[G.name])
161+
item_quants[G.name]++
162+
else
163+
item_quants[G.name] = 1
164+
items_loaded++
165+
if(items_loaded)
166+
user.visible_message( \
167+
"<span class='notice'>[user] empties \the [P] into \the [src].</span>", \
168+
"<span class='notice'>You empty \the [P] into \the [src].</span>")
169+
if(P.contents.len > 0)
170+
user << "<span class='notice'>Some items are refused.</span>"
171+
nanomanager.update_uis(src)
172+
updateUsrDialog()
173+
174+
141175
/*******************
142176
* SmartFridge Menu
143177
********************/
@@ -201,5 +235,3 @@
201235
return 0
202236

203237

204-
205-

Diff for: code/game/objects/items/blueprints.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ move an amendment</a> to the drawing.</p>
121121
return
122122
var/area/A = new
123123
A.name = str
124-
A.tag="[A.type]_[md5(str)]" // without this dynamic light system ruin everithing
124+
A.tagbase="[A.type]_[md5(str)]" // without this dynamic light system ruins everything
125125
//var/ma
126126
//ma = A.master ? "[A.master]" : "(null)"
127127
//world << "DEBUG: create_area: <br>A.name=[A.name]<br>A.tag=[A.tag]<br>A.master=[ma]"

Diff for: code/game/objects/items/weapons/storage/belt.dm

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272

7373

7474
/obj/item/weapon/storage/belt/medical
75+
use_to_pickup = 1 //Allow medical belt to pick up medicine
7576
name = "medical belt"
7677
desc = "Can hold various medical equipment."
7778
icon_state = "medicalbelt"

Diff for: code/game/objects/structures/crates_lockers/closets/fireaxe.dm

+7-4
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
if(istype(O, /obj/item/device/multitool))
2626
user << "\red Resetting circuitry..."
2727
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
28-
sleep(50) // Sleeping time~
29-
src.locked = 0
30-
user << "\blue You disable the locking modules."
31-
update_icon()
28+
if(do_after(user, 20))
29+
src.locked = 0
30+
user << "<span class = 'caution'> You disable the locking modules.</span>"
31+
update_icon()
3232
return
3333
else if(istype(O, /obj/item/weapon))
3434
var/obj/item/weapon/W = O
@@ -87,6 +87,9 @@
8787
src.locked = 1
8888
user << "\blue You re-enable the locking modules."
8989
playsound(user, 'sound/machines/lockenable.ogg', 50, 1)
90+
if(do_after(user,20))
91+
src.locked = 1
92+
user << "<span class = 'caution'> You re-enable the locking modules.</span>"
9093
return
9194
else
9295
localopened = !localopened

Diff for: code/game/turfs/simulated/walls.dm

+13-9
Original file line numberDiff line numberDiff line change
@@ -496,16 +496,20 @@
496496
"[user] drills a hole in \the [src] and pushes \a [P] into the void", \
497497
"\blue You have finished drilling in \the [src] and push the [P] into the void.", \
498498
"You hear ratchet.")
499-
/*
500-
new /obj/item/pipe(loc, make_from=src)
501-
for (var/obj/machinery/meter/meter in T)
502-
if (meter.target == src)
503-
new /obj/item/pipe_meter(T)
504-
del(meter)
505-
qdel(src)
506-
*/
499+
507500
user.drop_item()
508-
P.dir = user.dir
501+
if (P.pipe_type in list (1,3,12)) // bent pipe rotation fix see construction.dm
502+
P.dir = 5
503+
if (user.dir == 1)
504+
P.dir = 6
505+
if (user.dir == 2)
506+
P.dir = 9
507+
if (user.dir == 4)
508+
P.dir = 10
509+
if (user.dir == 5)
510+
P.dir = 8
511+
else
512+
P.dir = user.dir
509513
P.x = src.x
510514
P.y = src.y
511515
P.z = src.z

0 commit comments

Comments
 (0)