Langserver fixes, vol 2 (#7401)

This commit is contained in:
Erki
2019-11-15 23:42:25 +02:00
committed by Werner
parent 444c0d5ea5
commit ff41b92e97
39 changed files with 100 additions and 159 deletions

View File

@@ -1,20 +1,5 @@
#define DEBUG
//These get to go at the top, because they're special
//You can use these defines to get the typepath of the currently running proc/verb (yes procs + verbs are objects)
/* eg:
/mob/living/carbon/human/death()
world << THIS_PROC_TYPE_STR //You can only output the string versions
Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a string with () (eg: the _WITH_ARGS defines) to make it look nicer)
*/
#define THIS_PROC_TYPE .....
#define THIS_PROC_TYPE_STR "[THIS_PROC_TYPE]" //Because you can only obtain a string of THIS_PROC_TYPE using "[]", and it's nice to just +/+= strings
#define THIS_PROC_TYPE_STR_WITH_ARGS "[THIS_PROC_TYPE]([args.Join(",")])"
#define THIS_PROC_TYPE_WEIRD ...... //This one is WEIRD, in some cases (When used in certain defines? (eg: ASSERT)) THIS_PROC_TYPE will fail to work, but THIS_PROC_TYPE_WEIRD will work instead
#define THIS_PROC_TYPE_WEIRD_STR "[THIS_PROC_TYPE_WEIRD]" //Included for completeness
#define THIS_PROC_TYPE_WEIRD_STR_WITH_ARGS "[THIS_PROC_TYPE_WEIRD]([args.Join(",")])" //Ditto
// Turf-only flags.
#define NOJAUNT 1 // This is used in literally one place, turf.dm, to block ethereal jaunt.
#define MIMIC_BELOW 2 // If this turf should mimic the turf on the Z below.
@@ -300,11 +285,6 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s
#define DEBUG_REF(D) (D ? "\ref[D]|[D] ([D.type])" : "NULL")
// These defines write to log_debug, prefixing the path to the current proc.
// When using them, try PROCLOG first. If it does not compile, try PROCLOG_WEIRD.
#define PROCLOG(thing) log_debug("[THIS_PROC_TYPE]: [thing]")
#define PROCLOG_WEIRD(thing) log_debug("[THIS_PROC_TYPE_WEIRD]: [thing]")
//Recipe type defines. Used to determine what machine makes them
#define MICROWAVE 0x1
#define FRYER 0x2

View File

@@ -737,9 +737,15 @@ as a single icon. Useful for when you want to manipulate an icon via the above a
var/icon/add // Icon of overlay being added
// Current dimensions of flattened icon
var/{flatX1=1;flatX2=flat.Width();flatY1=1;flatY2=flat.Height()}
var/flatX1 = 1
var/flatX2 = flat.Width()
var/flatY1 = 1
var/flatY2=flat.Height()
// Dimensions of overlay being added
var/{addX1;addX2;addY1;addY2}
var/addX1
var/addX2
var/addY1
var/addY2
for(var/I in layers)

View File

@@ -91,7 +91,7 @@ Class Procs:
/datum/controller/subsystem/air/proc/reboot()
set waitfor = FALSE
// Stop processing while we rebuild.
can_fire = FALSE
@@ -152,7 +152,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
</span>"}, R_DEBUG)
admin_notice(span("danger", "Geometry processing completed in [(REALTIMEOFDAY - starttime)/10] seconds!"), R_DEBUG)
if (simulate)
admin_notice(span("danger", "Settling air..."), R_DEBUG)
@@ -168,7 +168,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
processing_edges = active_edges.Copy()
processing_fires = active_fire_zones.Copy()
processing_hotspots = active_hotspots.Copy()
var/list/curr_tiles = tiles_to_update
var/list/curr_defer = deferred
var/list/curr_edges = processing_edges
@@ -189,7 +189,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
continue
//check if the turf is self-zone-blocked
var/c_airblock
var/c_airblock
ATMOS_CANPASS_TURF(c_airblock, T, T)
if(c_airblock & ZONE_BLOCKED)
deferred += T
@@ -239,9 +239,9 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
else if (MC_TICK_CHECK)
return
continue
edge.tick()
if (no_mc_tick)
CHECK_TICK
else if (MC_TICK_CHECK)
@@ -257,7 +257,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
CHECK_TICK
else if (MC_TICK_CHECK)
return
while (curr_hotspot.len)
var/obj/fire/F = curr_hotspot[curr_hotspot.len]
curr_hotspot.len--
@@ -299,7 +299,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
#endif
var/ablock
ATMOS_CANPASS_TURF(ablock, A, B)
if(ablock == BLOCKED)
if(ablock == BLOCKED)
return BLOCKED
ATMOS_CANPASS_TURF(., B, A)
return ablock | .
@@ -340,16 +340,15 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
merge(A.zone,B.zone)
return
var
a_to_b = get_dir(A,B)
b_to_a = get_dir(B,A)
var/a_to_b = get_dir(A,B)
var/b_to_a = get_dir(B,A)
if(!A.connections) A.connections = new
if(!B.connections) B.connections = new
if(A.connections.get(a_to_b))
if(A.connections.get(a_to_b))
return
if(B.connections.get(b_to_a))
if(B.connections.get(b_to_a))
return
if(!space)
if(A.zone == B.zone) return
@@ -366,7 +365,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
#ifdef ZASDBG
ASSERT(isturf(T))
#endif
if(T.needs_air_update)
if(T.needs_air_update)
return
tiles_to_update += T
#ifdef ZASDBG
@@ -378,7 +377,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
#ifdef ZASDBG
ASSERT(istype(Z))
#endif
if(Z.needs_update)
if(Z.needs_update)
return
zones_to_update += Z
Z.needs_update = 1
@@ -387,7 +386,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
#ifdef ZASDBG
ASSERT(istype(E))
#endif
if(E.sleeping)
if(E.sleeping)
return
active_edges -= E
E.sleeping = 1
@@ -396,7 +395,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
#ifdef ZASDBG
ASSERT(istype(E))
#endif
if(!E.sleeping)
if(!E.sleeping)
return
active_edges += E
E.sleeping = 0
@@ -407,7 +406,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
/datum/controller/subsystem/air/proc/get_edge(zone/A, zone/B)
if(istype(B))
for(var/connection_edge/zone/edge in A.edges)
if(edge.contains_zone(B))
if(edge.contains_zone(B))
return edge
var/connection_edge/edge = new/connection_edge/zone(A,B)
edges += edge
@@ -415,7 +414,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
return edge
else
for(var/connection_edge/unsimulated/edge in A.edges)
if(has_same_air(edge.B,B))
if(has_same_air(edge.B,B))
return edge
var/connection_edge/edge = new/connection_edge/unsimulated(A,B)
edges += edge
@@ -423,11 +422,11 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
return edge
/datum/controller/subsystem/air/proc/has_same_air(turf/A, turf/B)
if(A.oxygen != B.oxygen)
if(A.oxygen != B.oxygen)
return 0
if(A.nitrogen != B.nitrogen)
if(A.nitrogen != B.nitrogen)
return 0
if(A.phoron != B.phoron)
if(A.phoron != B.phoron)
return 0
if(A.carbon_dioxide != B.carbon_dioxide)
return 0

View File

@@ -6,8 +6,8 @@
#define RETURN_PRECISE_POSITION(A) new /datum/position(A)
#define RETURN_PRECISE_POINT(A) new /datum/point(A)
#define RETURN_POINT_VECTOR(ATOM, ANGLE, SPEED) {new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED)}
#define RETURN_POINT_VECTOR_INCREMENT(ATOM, ANGLE, SPEED, AMT) {new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED, AMT)}
#define RETURN_POINT_VECTOR(ATOM, ANGLE, SPEED) new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED)
#define RETURN_POINT_VECTOR_INCREMENT(ATOM, ANGLE, SPEED, AMT) new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED, AMT)
/datum/position //For positions with map x/y/z and pixel x/y so you don't have to return lists. Could use addition/subtraction in the future I guess.
var/x = 0
@@ -224,4 +224,4 @@
var/needed_time = world.time - last_move
last_process = world.time
last_move = world.time
increment(needed_time / SSprojectiles.wait)
increment(needed_time / SSprojectiles.wait)

View File

@@ -89,7 +89,6 @@
if (!species_modifier)
var/datum/species/human_species = global.all_species["Human"]
species_modifier = human_species.economic_modifier
PROCLOG_WEIRD("species [H.species || "NULL"] did not have a set economic_modifier!")
var/money_amount = (rand(5,50) + rand(5, 50)) * loyalty * economic_modifier * species_modifier
var/datum/money_account/M = SSeconomy.create_account(H.real_name, money_amount, null)

View File

@@ -41,7 +41,7 @@
var/list/images = list()
var/num = 0
for (var/obj/item/I in CI.container).
for (var/obj/item/I in CI.container)
if (istype(I, /obj/item/weapon/reagent_containers/food/snacks/variable/cereal))
//Images of cereal boxes on cereal boxes is dumb
continue

View File

@@ -175,7 +175,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
if(FC.is_admin_channel)
dat+="<B><FONT style='BACKGROUND-COLOR: LightGreen '><A href='?src=\ref[src];show_channel=\ref[FC]'>[FC.channel_name]</A></FONT></B><BR>"
else
dat+="<B><A href='?src=\ref[src];show_channel=\ref[FC]'>[FC.channel_name]</A> [(FC.censored) ? ("<FONT COLOR='red'>***</FONT>") : ()]<BR></B>"
dat+="<B><A href='?src=\ref[src];show_channel=\ref[FC]'>[FC.channel_name]</A> [(FC.censored) ? ("<FONT COLOR='red'>***</FONT>") : null]<BR></B>"
dat+="<BR><HR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
dat+="<BR><A href='?src=\ref[src];setScreen=[0]'>Back</A>"
if(2)
@@ -279,7 +279,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
else
for(var/channel in SSnews.network_channels)
var/datum/feed_channel/FC = SSnews.GetFeedChannel(channel)
dat+="<A href='?src=\ref[src];pick_censor_channel=\ref[FC]'>[FC.channel_name]</A> [(FC.censored) ? ("<FONT COLOR='red'>***</FONT>") : ()]<BR>"
dat+="<A href='?src=\ref[src];pick_censor_channel=\ref[FC]'>[FC.channel_name]</A> [(FC.censored) ? ("<FONT COLOR='red'>***</FONT>") : null]<BR>"
dat+="<BR><A href='?src=\ref[src];setScreen=[0]'>Cancel</A>"
if(11)
dat+="<B>[current_map.company_name] D-Notice Handler</B><HR>"
@@ -291,7 +291,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
else
for(var/channel in SSnews.network_channels)
var/datum/feed_channel/FC = SSnews.GetFeedChannel(channel)
dat+="<A href='?src=\ref[src];pick_d_notice=\ref[FC]'>[FC.channel_name]</A> [(FC.censored) ? ("<FONT COLOR='red'>***</FONT>") : ()]<BR>"
dat+="<A href='?src=\ref[src];pick_d_notice=\ref[FC]'>[FC.channel_name]</A> [(FC.censored) ? ("<FONT COLOR='red'>***</FONT>") : null]<BR>"
dat+="<BR><A href='?src=\ref[src];setScreen=[0]'>Back</A>"
if(12)

View File

@@ -20,7 +20,6 @@
/obj/machinery/transformer/proc/MakeConveyor()
if (!loc)
PROCLOG_WEIRD("Trying to spawn conveyor in null space.")
return
new /obj/machinery/conveyor(loc, WEST, 1)
var/turf/T = get_turf(src)

View File

@@ -978,7 +978,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/proc/remove_pen(mob/user)
if (!istype(user))
PROCLOG_WEIRD("user variable was insane, aborting!")
return
if (!has_pen)
to_chat(user, "<span class='notice'>[src] does not have a pen slot.</span>")

View File

@@ -26,8 +26,8 @@
use_message = capitalize(copytext(sanitize(new_message), 1, MAX_MESSAGE_LEN))
to_chat(usr, "You configure the hailer to shout \"[use_message]\".")
/
obj/item/device/hailer/attack_self(mob/living/carbon/user as mob)
/obj/item/device/hailer/attack_self(mob/living/carbon/user as mob)
if (spamcheck)
return

View File

@@ -89,7 +89,7 @@
if (istype(E, /datum/stack_recipe))
var/datum/stack_recipe/R = E
var/max_multiplier = round(src.get_amount() / R.req_amount)
var/title as text
var/title
var/can_build = 1
can_build = can_build && (max_multiplier>0)
if (R.res_amount>1)

View File

@@ -105,7 +105,7 @@
/turf/simulated/wall/attackby(obj/item/weapon/W as obj, mob/user as mob)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if (!user.)
if (!user)
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return

View File

@@ -369,7 +369,7 @@ proc/admin_notice(var/message, var/rights)
if(FC.is_admin_channel)
dat+="<B><FONT style='BACKGROUND-COLOR: LightGreen'><A href='?src=\ref[src];ac_show_channel=\ref[FC]'>[FC.channel_name]</A></FONT></B><BR>"
else
dat+="<B><A href='?src=\ref[src];ac_show_channel=\ref[FC]'>[FC.channel_name]</A> [(FC.censored) ? ("<FONT COLOR='red'>***</FONT>") : ()]<BR></B>"
dat+="<B><A href='?src=\ref[src];ac_show_channel=\ref[FC]'>[FC.channel_name]</A> [(FC.censored) ? ("<FONT COLOR='red'>***</FONT>") : null]<BR></B>"
dat+={"<BR><HR><A href='?src=\ref[src];ac_refresh=1'>Refresh</A>
<BR><A href='?src=\ref[src];ac_setScreen=[0]'>Back</A>
"}
@@ -456,7 +456,7 @@ proc/admin_notice(var/message, var/rights)
else
for(var/channel in SSnews.network_channels)
var/datum/feed_channel/FC = SSnews.GetFeedChannel(channel)
dat+="<A href='?src=\ref[src];ac_pick_censor_channel=\ref[FC]'>[FC.channel_name]</A> [(FC.censored) ? ("<FONT COLOR='red'>***</FONT>") : ()]<BR>"
dat+="<A href='?src=\ref[src];ac_pick_censor_channel=\ref[FC]'>[FC.channel_name]</A> [(FC.censored) ? ("<FONT COLOR='red'>***</FONT>") : null]<BR>"
dat+="<BR><A href='?src=\ref[src];ac_setScreen=[0]'>Cancel</A>"
if(11)
dat+={"
@@ -470,7 +470,7 @@ proc/admin_notice(var/message, var/rights)
else
for(var/channel in SSnews.network_channels)
var/datum/feed_channel/FC = SSnews.GetFeedChannel(channel)
dat+="<A href='?src=\ref[src];ac_pick_d_notice=\ref[FC]'>[FC.channel_name]</A> [(FC.censored) ? ("<FONT COLOR='red'>***</FONT>") : ()]<BR>"
dat+="<A href='?src=\ref[src];ac_pick_d_notice=\ref[FC]'>[FC.channel_name]</A> [(FC.censored) ? ("<FONT COLOR='red'>***</FONT>") : null]<BR>"
dat+="<BR><A href='?src=\ref[src];ac_setScreen=[0]'>Back</A>"
if(12)
@@ -1126,7 +1126,7 @@ proc/admin_notice(var/message, var/rights)
out += "<b>Autotraitor <a href='?src=\ref[SSticker.mode];toggle=autotraitor'>disabled</a></b>.<br/>"
out += "<b>All antag ids:</b>"
if(LAZYLEN(SSticker.mode.antag_templates)).
if(LAZYLEN(SSticker.mode.antag_templates))
for(var/datum/antagonist/antag in SSticker.mode.antag_templates)
antag.update_current_antag_max()
out += " <a href='?src=\ref[SSticker.mode];debug_antag=[antag.id]'>[antag.id]</a>"
@@ -1374,8 +1374,8 @@ proc/admin_notice(var/message, var/rights)
return
if(!check_rights(R_SERVER,0))
message = sanitize(message, 500, extra = 0)
var/list/sounds = file2list("sound/serversound_list.txt");
sounds += "--CANCEL--"
sounds += "--LOCAL--"
@@ -1389,7 +1389,7 @@ proc/admin_notice(var/message, var/rights)
melody = input("Select a sound to play", "Sound select") as sound
if(!melody)
return
command_announcement.Announce(message, title, new_sound = melody)
log_and_message_admins("made custom announcement with custom sound", usr)
feedback_add_details("admin_verb","ACS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -27,11 +27,7 @@ var/datum/admin_secrets/admin_secrets = new()
/datum/admin_secret_category
var/name = ""
var/desc = ""
var/list/datum/admin_secret_item/items
/datum/admin_secret_category
..()
items = list()
var/list/datum/admin_secret_item/items = list()
/datum/admin_secret_category/proc/can_view(var/mob/user)
for(var/datum/admin_secret_item/item in items)

View File

@@ -403,7 +403,7 @@
if (!check_rights(R_MOD|R_ADMIN))
return
var/ckey = ckey(input("Please specify the ckey you want to search for:", "ckey")) as text
var/ckey = ckey(input("Please specify the ckey you want to search for:", "ckey") as text)
if (!ckey)
to_chat(usr, "<span class='notice'>Cancelled.</span>")
return

View File

@@ -13,7 +13,7 @@
switch(mission_level)
if(REPRESENTATIVE_MISSION_HIGH)
rep_objectives = pick("Collect evidence of Nanotrasen being unfair or bigoted to Vaurca employees, to be used as leverage in future hive labor negotiations",
"Begin the TCFL enlistment process for an individual, completing an Enlistment form to be turned in by the individual,"
"Begin the TCFL enlistment process for an individual, completing an Enlistment form to be turned in by the individual",
"Develop a metric to grade the performance of different Vaurca broods that share a job")
if(REPRESENTATIVE_MISSION_MEDIUM)

View File

@@ -1,27 +1,4 @@
/*
/datum/bounty/item/alien_organs
name = "Alien Organs"
description = "Nanotrasen is interested in studying Xenomorph biology. Ship a set of organs to be thoroughly compensated."
reward = 25000
required_count = 3
wanted_types = list(/obj/item/organ/brain/alien, /obj/item/organ/alien, /obj/item/organ/body_egg/alien_embryo)
/datum/bounty/item/syndicate_documents
name = "Syndicate Documents"
description = "Intel regarding the syndicate is highly prized at CentCom. If you find syndicate documents, ship them. You could save lives."
reward = 10000
wanted_types = list(/obj/item/documents/syndicate, /obj/item/documents/photocopy)
/datum/bounty/item/syndicate_documents/applies_to(obj/O)
if(!..())
return FALSE
if(istype(O, /obj/item/documents/photocopy))
var/obj/item/documents/photocopy/Copy = O
return (Copy.copy_type && ispath(Copy.copy_type, /obj/item/documents/syndicate))
return TRUE
*/
/datum/bounty/more_bounties/
..()
/datum/bounty/more_bounties
name = "More Bounties"
description = "Complete enough bounties and %BOSSSHORT will issue new ones!"
reward = 3 // number of bounties

View File

@@ -136,7 +136,7 @@ var/list/global/random_stock_large = list()
var/cratespawn = 0
var/obj/structure/closet/crate/emptiest
if (prob(70))//We'll usually put items in crates
var/minweight = 99999999999//We will distribute items somewhat evenly among crates
var/minweight = 1000000000 //We will distribute items somewhat evenly among crates
//by selecting the least-filled one for each spawn
for (var/obj/structure/closet/crate/C in containers)
@@ -247,4 +247,4 @@ var/list/global/random_stock_large = list()
name = "Large Stock Marker"
desc = "This marks a place where a large object could spawn in cargo"
icon = 'icons/mob/screen/generic.dmi'
icon_state = "x3"
icon_state = "x3"

View File

@@ -32,7 +32,7 @@
rig.malfunction_delay = 0
else
rig.malfunctioning += 10
rig.malfunction_delay = 99999999999999999999
rig.malfunction_delay = 10000000000
/datum/wires/rig/UpdatePulsed(var/index)
@@ -61,4 +61,4 @@
var/obj/item/weapon/rig/rig = holder
if(rig.open)
return 1
return 0
return 0

View File

@@ -85,9 +85,8 @@ proc/Ellipsis(original_msg, chance = 50)
if(chance <= 0) return "..."
if(chance >= 100) return original_msg
var/list
words = text2list(original_msg," ")
new_words = list()
var/list/words = text2list(original_msg," ")
var/list/new_words = list()
var/new_msg = ""

View File

@@ -182,7 +182,7 @@
//We will not touch things which are not required for this recipe. They will be left behind for the caller
//to decide what to do. They may be used again to make another recipe or discarded, or merged into the results,
//thats no longer the concern of this proc
var/datum/reagents/buffer = new /datum/reagents(999999999999, null)//
var/datum/reagents/buffer = new /datum/reagents(1000000000000, null)//
//Find items we need
@@ -228,7 +228,7 @@
If, as in the most common case, there is only a single result, then it will just be a reference to
the single-result's reagents
*/
var/datum/reagents/holder = new/datum/reagents(9999999999)
var/datum/reagents/holder = new/datum/reagents(10000000000)
var/list/results = list()
while (tally < result_quantity)
var/obj/result_obj = new result(container)

View File

@@ -372,7 +372,7 @@
return
// Check if we should even bother working on the current seed datum.
if(seed.mutants. && seed.mutants.len && severity > 1)
if(seed.mutants?.len && severity > 1)
mutate_species()
return

View File

@@ -459,7 +459,5 @@
UNSETEMPTY(effect_str)
UNSETEMPTY(affecting_turfs)
#undef QUEUE_UPDATE
#undef DO_UPDATE
#undef INTELLIGENT_UPDATE
#undef PSEUDO_WEDGE

View File

@@ -73,7 +73,7 @@ var/list/diona_banned_languages = list(
apply_radiation(-2)
DS.stored_energy += 2
apply_radiation(-0.5) //Radiation is gradually wasted if its not used for something
if(total_radiation < 0)
total_radiation = null
@@ -90,7 +90,7 @@ var/list/diona_banned_languages = list(
if (DS.nutrient_organ)
if (DS.nutrient_organ.is_broken())
return 0
if (consume_nutrition_from_air && (nutrition / max_nutrition > 0.25))
to_chat(src, span("notice", "You feel like you have replanished enough of nutrition to stay alive. Consuming more makes you feel gross."))
consume_nutrition_from_air = !consume_nutrition_from_air
@@ -324,13 +324,13 @@ var/list/diona_banned_languages = list(
return
DS.regen_limb_progress = 0
diona_regen_progress(DS)
visible_message("<span class='warning'>[src] begins to shift and quiver.</span>",
"<span class='warning'>You begin to shift and quiver, feeling a stirring within your trunk</span>")
DS.regening_organ = TRUE
to_chat(src, "<span class='notice'>You are trying to regrow a lost limb, this is a long and complicated process!</span>")
var/list/special_case = list(
/obj/item/organ/external/arm/diona = /obj/item/organ/external/hand/diona,
/obj/item/organ/external/arm/right/diona = /obj/item/organ/external/hand/right/diona,
@@ -660,9 +660,6 @@ var/list/diona_banned_languages = list(
nutrient_organ = null
return ..()
#undef FLASHLIGHT_STRENGTH
#undef PDALIGHT_STRENGTH
#undef DIONA_MAX_LIGHT
#undef TEMP_REGEN_STOP
#undef TEMP_REGEN_NORMAL
#undef TEMP_INCREASE_REGEN_DOUBLE

View File

@@ -41,7 +41,7 @@ calculate text size per text.
tastes[taste_desc] += taste_amount
else
tastes[taste_desc] = taste_amount
if(!(R.default_temperature in (T0C + 15 to T0C + 25)))
if(R.default_temperature >= (T0C + 15) && R.default_temperature <= (T0C + 25))
lukewarm = 1
//deal with percentages

View File

@@ -65,7 +65,7 @@
/mob/living/bullet_act(var/obj/item/projectile/P, var/def_zone)
//Being hit while using a cloaking device
var/obj/item/weapon/cloaking_device/C = locate((/obj/item/weapon/cloaking_device) in src)
var/obj/item/weapon/cloaking_device/C = locate(/obj/item/weapon/cloaking_device) in src
if(C && C.active)
C.attack_self(src)//Should shut it off
update_icons()
@@ -401,4 +401,4 @@
client.screen += hud_used.hide_actions_toggle
#undef MOB_FIRE_LIGHT_RANGE //These control the intensity and range of light given off by a mob which is on fire
#undef MOB_FIRE_LIGHT_POWER
#undef MOB_FIRE_LIGHT_POWER

View File

@@ -303,7 +303,7 @@
/obj/item/pipe/can_fall(turf/below, turf/simulated/open/dest = src.loc)
. = ..()
if((locate(/obj/structure/disposalpipe/up) in below) || locate(/obj/machinery/atmospherics/pipe/zpipe/up in below))
if((locate(/obj/structure/disposalpipe/up) in below) || (locate(/obj/machinery/atmospherics/pipe/zpipe/up) in below))
return FALSE
// Only things that stop mechas are atoms that, well, stop them.

View File

@@ -71,7 +71,6 @@
*/
/turf/simulated/open/proc/add_climber(atom/climber, flags = CLIMBER_DEFAULT)
if (!flags)
PROCLOG_WEIRD("Attempted to add climber [climber] without flags.")
return FALSE
if (LAZYACCESS(climbers, climber))

View File

@@ -493,7 +493,8 @@
stamps += (stamps=="" ? "<HR>" : "<BR>") + "<i>This paper has been stamped with the [P.name].</i>"
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
var/{x; y;}
var/x
var/y
if(istype(P, /obj/item/weapon/stamp/captain) || istype(P, /obj/item/weapon/stamp/centcomm))
x = rand(-2, 0)
y = rand(-1, 2)

View File

@@ -12,7 +12,7 @@
attack_verb = list("bapped")
var/page = 1 // current page
var/list/pages = list() // Ordered list of pages as they are to be displayed. Can be different order than src.contents.
var amount = 0 // How many sheet
var/amount = 0 // How many sheet
drop_sound = 'sound/items/drop/paper.ogg'
/obj/item/weapon/paper_bundle/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -126,7 +126,7 @@
else if(istype(pages[page], /obj/item/weapon/photo))
var/obj/item/weapon/photo/P = W
to_chat(user, browse_rsc(P.img, "tmp_photo.png"))
user << browse(dat + "<html><head><title>[P.name]</title></head>" + "<body style='overflow:hidden'>" + "<div> <img src='tmp_photo.png' width = '180'" + "[P.scribble ? "<div> Written on the back:<br><i>[P.scribble]</i>" : ]" + "</body></html>", "window=[name]")
user << browse(dat + "<html><head><title>[P.name]</title></head>" + "<body style='overflow:hidden'>" + "<div> <img src='tmp_photo.png' width = '180'" + "[P.scribble ? "<div> Written on the back:<br><i>[P.scribble]</i>" : null]" + "</body></html>", "window=[name]")
/obj/item/weapon/paper_bundle/attack_self(mob/user as mob)
src.show_content(user)

View File

@@ -459,7 +459,8 @@
/obj/item/projectile/proc/process_hitscan()
var/safety = range * 3
record_hitscan_start(RETURN_POINT_VECTOR_INCREMENT(src, Angle, MUZZLE_EFFECT_PIXEL_INCREMENT, 1))
var/return_vector = RETURN_POINT_VECTOR_INCREMENT(src, Angle, MUZZLE_EFFECT_PIXEL_INCREMENT, 1)
record_hitscan_start(return_vector)
while(loc && !QDELETED(src))
if(paused)
stoplag(1)

View File

@@ -2254,7 +2254,7 @@
/obj/item/weapon/reagent_containers/food/snacks/jelliedtoast/cherry
/obj/item/weapon/reagent_containers/food/snacks/jelliedtoast/cherry/Initialize()
. ..()
. = ..()
reagents.add_reagent("cherryjelly", 5)
/obj/item/weapon/reagent_containers/food/snacks/jelliedtoast/slime

View File

@@ -76,7 +76,6 @@
return
if (!loc)
PROCLOG_WEIRD("loc is null, breaking self.")
stat |= BROKEN
return

View File

@@ -407,7 +407,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
var/obj/item/weapon/paper/PR = new/obj/item/weapon/paper
var/pname = "list of researched technologies"
var/info = "<center><b>[station_name()] Science Laboratories</b>"
info += "<h2>[ (text2num(href_list["print"]) == 2) ? "Detailed" : ] Research Progress Report</h2>"
info += "<h2>[ (text2num(href_list["print"]) == 2) ? "Detailed" : null] Research Progress Report</h2>"
info += "<i>report prepared at [worldtime2text()] station time</i></center><br>"
if(text2num(href_list["print"]) == 2)
info += GetResearchListInfo()

View File

@@ -53,10 +53,9 @@
if(/token/word)
return new/node/expression/value/variable(T.value)
if(/token/accessor)
var
token/accessor/A=T
node/expression/value/variable/E//=new(A.member)
stack/S=new()
var/token/accessor/A = T
var/node/expression/value/variable/E
var/stack/S = new()
while(istype(A.object, /token/accessor))
S.Push(A)
A=A.object
@@ -181,11 +180,10 @@
- <ParseParamExpression()>
*/
ParseExpression(list/end=list(/token/end), list/ErrChars=list("{", "}"))
var/stack
opr=new
val=new
var/stack/opr = new
var/stack/val = new
src.expecting=VALUE
for()
while (1)
if(EndOfExpression(end))
break
if(istype(curToken, /token/symbol) && ErrChars.Find(curToken.value))
@@ -278,7 +276,7 @@
NextToken() //skip open parenthesis, already found
var/loops = 0
for()
while (1)
loops++
if(loops>=1000)
CRASH("Something TERRIBLE has gone wrong in ParseFunctionExpression ;__;")
@@ -311,4 +309,4 @@
- <ParseExpression()>
*/
ParseParamExpression()
return ParseExpression(list(",", ")"))
return ParseExpression(list(",", ")"))

View File

@@ -134,7 +134,7 @@ var/const/Represents a special statement in the code triggered by a keyword.
parser.NextToken()
if(!parser.CheckToken("(", /token/symbol))
return KW_FAIL
for() //for now parameters can be separated by whitespace - they don't need a comma in between
while (1) //for now parameters can be separated by whitespace - they don't need a comma in between
if(istype(parser.curToken, /token/symbol))
switch(parser.curToken.value)
if(",")

View File

@@ -172,7 +172,7 @@
if(!CheckToken("(", /token/symbol)) //Check for and skip open parenthesis
return
var/loops = 0
for()
while (1)
loops++
if(loops>=6000)
CRASH("Something TERRIBLE has gone wrong in ParseFunctionStatement ;__;")
@@ -186,4 +186,4 @@
return
var/node/expression/P=ParseParamExpression()
stmt.parameters+=P
if(istype(curToken, /token/symbol) && curToken.value==",") NextToken()
if(istype(curToken, /token/symbol) && curToken.value==",") NextToken()

View File

@@ -153,8 +153,7 @@
start - The character used to start the string.
*/
ReadString(start)
var
buf
var/buf
for(, codepos <= lentext(code), codepos++)//codepos to lentext(code))
var/char=copytext(code, codepos, codepos+1)
switch(char)
@@ -189,9 +188,8 @@
Reads characters separated by an item in <delim> into a token.
*/
ReadWord()
var
char=copytext(code, codepos, codepos+1)
buf
var/char=copytext(code, codepos, codepos+1)
var/buf
while(!delim.Find(char) && codepos<=lentext(code))
buf+=char
char=copytext(code, ++codepos, codepos+1)
@@ -206,9 +204,8 @@
Reads a symbol into a token.
*/
ReadSymbol()
var
char=copytext(code, codepos, codepos+1)
buf
var/char=copytext(code, codepos, codepos+1)
var/buf
while(options.symbols.Find(buf+char))
buf+=char
@@ -223,10 +220,9 @@
Reads a number into a token.
*/
ReadNumber()
var
char=copytext(code, codepos, codepos+1)
buf
dec=0
var/char = copytext(code, codepos, codepos+1)
var/buf
var/dec = 0
while(options.IsDigit(char) || (char=="." && !dec))
if(char==".") dec=1
@@ -246,14 +242,13 @@
*/
ReadComment()
var
char=copytext(code, codepos, codepos+1)
nextchar=copytext(code, codepos+1, codepos+2)
charstring = char+nextchar
comm = 1
var/char = copytext(code, codepos, codepos+1)
var/nextchar = copytext(code, codepos+1, codepos+2)
var/charstring = char+nextchar
var/comm = 1
// 1: single-line comment
// 2: multi-line comment
expectedend = 0
var/expectedend = 0
if(charstring == "//" || charstring == "/*")
if(charstring == "/*")

View File

@@ -582,7 +582,6 @@ datum/unit_test/robot_module_icons/start_test()
return 1
#undef VULNERABLE
#undef IMMUNE
#undef SUCCESS
#undef FAILURE