Skip to content

Commit d3dd9bf

Browse files
Merge branch 'vgstation-coders:Bleeding-Edge' into welcome-to-the-jungle
2 parents abc0fe8 + 5047dc5 commit d3dd9bf

File tree

318 files changed

+35769
-6980
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

318 files changed

+35769
-6980
lines changed

__DEFINES/economy.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#define SECURITY_AUTO_LOGIN 0
2+
#define SECURITY_MANUAL_LOGIN 1
3+
#define SECURITY_CARD_AND_MANUAL_LOGIN 2

__DEFINES/html_wrappers.dm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Wrappers needed for webview 2.0 / 516 compat.
2+
3+
#define HTML_SKELETON_INTERNAL(head, body, style) \
4+
"<!DOCTYPE html><html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><meta http-equiv='X-UA-Compatible' content='IE=edge'>[head]</head><body style=[style]>[body]</body></html>"
5+
6+
#define HTML_SKELETON_TITLE_STYLE(title, body, style) HTML_SKELETON_INTERNAL("<title>[title]</title>", body, style)
7+
#define HTML_SKELETON_TITLE(title, body) HTML_SKELETON_INTERNAL("<title>[title]</title>", body, "")
8+
#define HTML_SKELETON(body) HTML_SKELETON_INTERNAL("", body, "")

__DEFINES/reagents.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,7 @@
527527
#define AMINOMICIAN "aminomician"
528528
#define AMINOCYPRINIDOL "aminocyprinidol"
529529
#define AMINOBLATELLA "aminoblatella"
530+
#define AMINOCORYDON "aminocorydon"
530531
#define TOMATO_SOUP "tomato_soup"
531532
#define LUMINOL "luminol"
532533
#define CAFFEINE "caffeine"

__DEFINES/spell_defines.dm

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,33 +25,33 @@
2525
#define NO_SPELLBOOK 131072 //Does not show up in the spell list for spellbook purposes
2626

2727
//invocation
28-
#define SpI_SHOUT "shout"
29-
#define SpI_WHISPER "whisper"
30-
#define SpI_EMOTE "emote"
31-
#define SpI_NONE "none"
28+
#define SP_INV_SHOUT "shout"
29+
#define SP_INV_WHISPER "whisper"
30+
#define SP_INV_EMOTE "emote"
31+
#define SP_INV_NONE "none"
3232

3333
//upgrading
34-
#define Sp_SPEED "cooldown"
35-
#define Sp_POWER "power"
36-
#define Sp_MOVE "mobility"
37-
#define Sp_AMOUNT "amount"
38-
#define Sp_RANGE "range"
34+
#define SP_SPEED "cooldown"
35+
#define SP_POWER "power"
36+
#define SP_MOVE "mobility"
37+
#define SP_AMOUNT "amount"
38+
#define SP_RANGE "range"
3939

40-
#define Sp_TOTAL "total"
40+
#define SP_TOTAL "total"
4141

4242
//casting costs
43-
#define Sp_RECHARGE 1
44-
#define Sp_CHARGES 2
45-
#define Sp_HOLDVAR 4
46-
#define Sp_GRADUAL 8
47-
#define Sp_PASSIVE 16
43+
#define SP_RECHARGE 1
44+
#define SP_CHARGES 2
45+
#define SP_HOLDVAR 4
46+
#define SP_GRADUAL 8
47+
#define SP_PASSIVE 16
4848

4949
//spell range
5050
#define SELFCAST -1
5151
#define GLOBALCAST -2
5252

5353
//buying costs
54-
#define Sp_BASE_PRICE 20
54+
#define SP_BASE_PRICE 20
5555

5656
//Autocast flags
5757
#define AUTOCAST_NOTARGET 1 //For spells with complex targeting (AI can't pick a target)
@@ -95,3 +95,6 @@
9595
#define SPECIFIC_TELEPATHY 1
9696
#define LOCAL_TELEPATHY 2
9797
#define GLOBAL_TELEPATHY 4
98+
99+
// Purely helper proc to make code more readable
100+
#define CHARGES *1

code/ATMOSPHERICS/components/trinary_devices/pressure_valve.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
</body>
100100
"}
101101

102-
user << browse(dat, "window=atmo_conditional_valve")
102+
user << browse(HTML_SKELETON(dat), "window=atmo_conditional_valve")
103103
onclose(user, "atmo_conditional_valve")
104104
return
105105

code/ZAS/NewSettings.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ a { color: white; }
420420
dat += {"<dt><b>[s.name]</b> = <i>[s.value]</i> <A href='?src=\ref[src];changevar=[id]'>\[Change\]</A></dt>
421421
<dd>[s.desc]</i></dd>"}
422422
dat += "</dl></body></html>"
423-
user << browse(dat,"window=settings")
423+
user << browse(HTML_SKELETON(dat),"window=settings")
424424

425425
/ZAS_Settings/Topic(href,href_list)
426426
if("changevar" in href_list)

code/_onclick/hud/screen_objects.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@
165165
return 1
166166
if(master)
167167
var/obj/item/I = usr.get_active_hand()
168-
if(I)
169-
master.attackby(I, usr, params)
168+
if(I && master.can_quick_store(I))
169+
master.quick_store(I, usr)
170170
//usr.next_move = world.time+2
171171
return 1
172172

code/_onclick/hud/spell_screen_objects.dm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,12 +304,12 @@
304304
spell_icon = spell.hud_state
305305
overlays -= spell_icon
306306

307-
if((spell.charge_type & Sp_RECHARGE) || (spell.charge_type & Sp_CHARGES) || (spell.charge_type & Sp_GRADUAL))
308-
if(spell.charge_counter < spell.charge_max)
307+
if((spell.charge_type & SP_RECHARGE) || (spell.charge_type & SP_CHARGES) || (spell.charge_type & SP_GRADUAL))
308+
if(spell.charge_counter < spell.charge_cooldown_max)
309309
icon_state = "[spell_base]_spell_base"
310310
if(spell.charge_counter > 0)
311311
var/icon/partial_charge = icon(src.icon, "[spell_base]_spell_ready")
312-
partial_charge.Crop(1, 1, partial_charge.Width(), round(partial_charge.Height() * spell.charge_counter / spell.charge_max))
312+
partial_charge.Crop(1, 1, partial_charge.Width(), round(partial_charge.Height() * spell.charge_counter / spell.charge_cooldown_max))
313313
overlays += partial_charge
314314
if(last_charged_icon)
315315
overlays -= last_charged_icon

code/controllers/subsystem/garbage.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ List of hard deletions:"}
228228
if(L.len == 1)
229229
to_chat(usr, "No garbage collector deletions this round")
230230
return
231-
usr << browse(jointext(L,""),"window=harddellogs")
231+
usr << browse(HTML_SKELETON(jointext(L, "")),"window=harddellogs")
232232

233233
/*
234234
* NEVER USE THIS FOR /atom OTHER THAN /atom/movable

code/datums/datumvars.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ function loadPage(list) {
346346

347347
html += "</html>"
348348

349-
usr << browse(html, "window=variables\ref[D];size=475x650")
349+
usr << browse(HTML_SKELETON(html), "window=variables\ref[D];size=475x650")
350350

351351
/client/proc/debug_variable(name, value, list/searched, var/datum/DA = null)
352352
var/html = ""
@@ -453,7 +453,7 @@ function loadPage(list) {
453453
html += "<hr>"
454454
html += debug_variable(null, L)
455455

456-
usr << browse(html, "window=listedit\ref[L];size=475x650")
456+
usr << browse(HTML_SKELETON(html), "window=listedit\ref[L];size=475x650")
457457

458458
/client/proc/view_var_Topic(href, href_list, hsrc)
459459
//This should all be moved over to datum/admins/Topic() or something ~Carn

code/datums/gamemode/dynamic/dynamic.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ var/stacking_limit = 90
146146
out += "<B>Remaining threat/threat_level:</B> [threat]/[threat_level]<br/>"
147147
out += "<B>Remaining midround threat/threat_level:</B> [midround_threat]/[midround_threat_level]"
148148

149-
usr << browse(out, "window=threatlog;size=700x500")
149+
usr << browse(HTML_SKELETON(out), "window=threatlog;size=700x500")
150150

151151
/datum/gamemode/dynamic/GetScoreboard()
152152

code/datums/gamemode/factions/bloodcult/bloodcult_items.dm

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,11 @@ var/list/arcane_tomes = list()
7575

7676
/obj/item/weapon/tome/proc/tome_text()
7777
var/page_data = null
78-
var/dat = {"<title>arcane tome</title><body style="color:#FFFFFF" bgcolor="#110000">
79-
78+
var/title = "arcane tome"
79+
var/body_style = {"
80+
"color:#FFFFFF" bgcolor="#110000"
81+
"}
82+
var/dat = {"
8083
<style>
8184
label {display: inline-block; width: 50px;text-align: right;float: left;margin: 0 0 0 10px;}
8285
ul {list-style-type: none;}
@@ -122,9 +125,9 @@ var/list/arcane_tomes = list()
122125
else
123126
dat += page_special()
124127

125-
dat += {"</div></div></div></body>"}
128+
dat += {"</div></div></div>"}
126129

127-
return dat
130+
return HTML_SKELETON_TITLE_STYLE(title, dat, body_style)
128131

129132
/obj/item/weapon/tome/proc/page_special()
130133
var/dat = null

code/datums/gamemode/factions/bloodcult/bloodcult_spells.dm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ var/list/arcane_pockets = list()
1313
desc = "Cast while holding an Arcane Tome to discretly store it through the veil."
1414
hud_state = "cult_pocket_empty"
1515

16-
invocation_type = SpI_NONE
17-
charge_type = Sp_RECHARGE
18-
charge_max = 0
16+
invocation_type = SP_INV_NONE
17+
charge_type = SP_RECHARGE
18+
charge_cooldown_max = 0
1919
range = 0
2020
spell_flags = null
2121
insufficient_holder_msg = ""
@@ -84,7 +84,7 @@ var/list/arcane_pockets = list()
8484
user_type = USER_TYPE_CULT
8585
hud_state = "astral_return"
8686
override_base = "cult"
87-
charge_max = 0
87+
charge_cooldown_max = 0
8888
spell_flags = 0
8989
range = 0
9090

@@ -100,7 +100,7 @@ var/list/arcane_pockets = list()
100100
name = "Toggle Tangibility"
101101
desc = "Turn into a visible copy of your body, able to speak and bump into doors. But note that the slightest source of damage will dispel your astral projection altogether."
102102
user_type = USER_TYPE_CULT
103-
charge_max = 50//relatively short, but still there to prevent too much spamming in/out of tangibility
103+
charge_cooldown_max = 5 SECONDS//relatively short, but still there to prevent too much spamming in/out of tangibility
104104
hud_state = "astral_toggle"
105105
override_base = "cult"
106106
spell_flags = 0

code/datums/gamemode/factions/legacy_cult/ritual.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ var/runedec = 0 // Rune cap ?
294294
[words[9]] is <a href='byond://?src=\ref[src];number=9;action=change'>[words[words[9]]]</A> <A href='byond://?src=\ref[src];number=9;action=clear'>Clear</A><BR>
295295
[words[10]] is <a href='byond://?src=\ref[src];number=10;action=change'>[words[words[10]]]</A> <A href='byond://?src=\ref[src];number=10;action=clear'>Clear</A><BR>
296296
"}
297-
usr << browse("[notedat]", "window=notes")
297+
usr << browse(HTML_SKELETON(notedat), "window=notes")
298298
// call(/obj/item/weapon/tome_legacy/proc/edit_notes)()
299299
else
300300
usr << browse(null, "window=notes")

code/datums/gamemode/factions/legacy_cult/runes.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,8 +1450,8 @@
14501450
to_chat(C, "<B>You are now an Artificer. You are incredibly weak and fragile, but you are able to construct new floors and walls, to break some walls apart, to repair allied constructs (by clicking on them), </B><I>and most important of all create new constructs</I><B> (Use your Artificer spell to summon a new construct shell and Summon Soulstone to create a new soulstone).</B>")
14511451
//ticker.mode.update_cult_icons_added(C.mind)
14521452
for(var/spell/S in C.spell_list)
1453-
if(S.charge_type & Sp_RECHARGE)
1454-
if(S.charge_counter == S.charge_max) //Spell is fully charged - let the proc handle everything
1453+
if(S.charge_type & SP_RECHARGE)
1454+
if(S.charge_counter == S.charge_cooldown_max) //Spell is fully charged - let the proc handle everything
14551455
S.take_charge()
14561456
else //Spell is on cooldown and already recharging - there's no need to call S.process(), just reset charges to 0
14571457
S.charge_counter = 0

code/datums/gamemode/factions/legacy_cult/talisman.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
<A href='?src=\ref[src];rune=soulstone'>Kal om neth</A> - Summons a soul stone<BR>
144144
<A href='?src=\ref[src];rune=construct'>Da A'ig Osk</A> - Summons a construct shell for use with captured souls. It is too large to carry on your person.<BR>"}
145145
//<A href='?src=\ref[src];rune=armor'>Sa tatha najin</A> - Allows you to summon armored robes and an unholy blade<BR> //Kept for reference
146-
usr << browse(dat, "window=id_com;size=350x200")
146+
usr << browse(HTML_SKELETON(dat), "window=id_com;size=350x200")
147147
return
148148

149149

code/datums/gamemode/objectives/ninja/dominatesilicons.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
if(!any_borgs_alive)
3333
return TRUE
3434
var/collected = 0
35-
for(var/obj/item/device/mmi/M in recursive_type_check(owner, /obj/item/device/mmi))
35+
for(var/obj/item/device/mmi/M in recursive_type_check(owner.current, /obj/item/device/mmi))
3636
if(istype(M,/obj/item/device/mmi/posibrain))
3737
if(M.brainmob.mind)
3838
collected++ //Only posibrains that had a mind

code/datums/gamemode/objectives/target/assassinate.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ var/list/assassination_objectives = list()
109109
//Drains all TCs from the assassinated player's uplink even if it had less than 8.
110110
if (enemy_uplink)
111111
enemy_uplink.telecrystals = 0
112-
var/obj/item/device/roganbot/killbot/killbotfound = recursive_type_check(owner,/obj/item/device/roganbot/killbot)
112+
var/obj/item/device/roganbot/killbot/killbotfound = recursive_type_check(owner.current,/obj/item/device/roganbot/killbot)
113113
//Checks if the new target would be the player themselves; if so, they have won.
114114
if (A.target == owner)
115115
to_chat(owner.current, "<span class='notice'>The Syndicate congratulates you on your victory. Look forward to be assigned on higher risk operations another day.</span>")

code/datums/gamemode/objectives/target/syndicate/skulls.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
if (..())
2525
return TRUE
2626
var/collected = 0
27-
for(var/obj/item/organ/external/head/H in recursive_type_check(owner, /obj/item/organ/external/head))
27+
for(var/obj/item/organ/external/head/H in recursive_type_check(owner.current, /obj/item/organ/external/head))
2828
if(!H.organ_data)
2929
continue
3030
var/mob/living/carbon/brain/B = H.brainmob

code/datums/gamemode/powers/powers.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@
333333
</body></html>
334334
"}
335335

336-
usr << browse(dat, "window=powers;size=900x480")
336+
usr << browse(HTML_SKELETON(dat), "window=powers;size=900x480")
337337

338338

339339

code/datums/gamemode/role/malf/malf_apcs.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@
114114
/spell/aoe_turf/corereturn
115115
name = "Return to Core"
116116
panel = "Malfunction"
117-
charge_type = Sp_CHARGES
118-
charge_max = 1
117+
charge_type = SP_CHARGES
118+
charge_cooldown_max = 1 CHARGES
119119
hud_state = "unshunt"
120120

121121
/spell/aoe_turf/corereturn/before_target(mob/user)

code/datums/gamemode/role/rambler.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
name = "Lock in Vow"
137137
desc = "Allows you to vow to another soul."
138138
abbreviation = "LV"
139-
charge_max = 100
139+
charge_cooldown_max = 10 SECONDS
140140
max_targets = 1
141141
spell_flags = WAIT_FOR_CLICK
142142
valid_targets = list(/mob/living)

code/datums/helper_datums/getrev.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
output += {"Current Infomational Settings: <br>
1414
BYOND version of server: [world.byond_version].[world.byond_build]<br>
1515
Protect Authority Roles From Tratior: [config.protect_roles_from_antagonist]<br>"}
16-
usr << browse(output,"window=revdata");
16+
usr << browse(HTML_SKELETON(output),"window=revdata");
1717
return

code/datums/mind.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@
224224

225225
//<a href='?src=\ref[src];obj_announce=1'>Announce objectives</a><br><br>"} TODO: make sure that works
226226

227-
usr << browse(out, "window=role_panel[src];size=700x500")
227+
usr << browse(HTML_SKELETON(out), "window=role_panel[src];size=700x500")
228228

229229
/datum/mind/proc/role_purchase_log()
230230
if(!ticker || !ticker.mode)
@@ -255,7 +255,7 @@
255255
for(var/entry in W.potions_bought)
256256
out += "[entry]<BR>"
257257

258-
usr << browse(out, "window=role_purchase_log[src];size=300x500")
258+
usr << browse(HTML_SKELETON(out), "window=role_purchase_log[src];size=300x500")
259259

260260
/datum/mind/proc/get_faction_list()
261261
var/list/all_factions = list()

0 commit comments

Comments
 (0)