mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 06:27:26 +01:00
Resolve some issues that the compiler doesn't spot
This commit is contained in:
+10
-4
@@ -731,10 +731,16 @@ The _flatIcons list is a cache for generated icon files.
|
||||
|
||||
var/icon/add // Icon of overlay being added
|
||||
|
||||
// Current dimensions of flattened icon
|
||||
var/{flatX1=1;flatX2=flat.Width();flatY1=1;flatY2=flat.Height()}
|
||||
// Dimensions of overlay being added
|
||||
var/{addX1;addX2;addY1;addY2}
|
||||
// Current dimensions of flattened icon
|
||||
var/flatX1=1
|
||||
var/flatX2=flat.Width()
|
||||
var/flatY1=1
|
||||
var/flatY2=flat.Height()
|
||||
// Dimensions of overlay being added
|
||||
var/addX1
|
||||
var/addX2
|
||||
var/addY1
|
||||
var/addY2
|
||||
|
||||
for(var/I in layers)
|
||||
|
||||
|
||||
@@ -1297,31 +1297,6 @@ proc/atan2(x, y)
|
||||
if(!x && !y) return 0
|
||||
return y >= 0 ? arccos(x / sqrt(x * x + y * y)) : -arccos(x / sqrt(x * x + y * y))
|
||||
|
||||
proc/rotate_icon(file, state, step = 1, aa = FALSE)
|
||||
var icon/base = icon(file, state)
|
||||
|
||||
var w, h, w2, h2
|
||||
|
||||
if(aa)
|
||||
aa++
|
||||
w = base.Width()
|
||||
w2 = w * aa
|
||||
h = base.Height()
|
||||
h2 = h * aa
|
||||
|
||||
var icon{result = icon(base); temp}
|
||||
|
||||
for(var/angle in 0 to 360 step step)
|
||||
if(angle == 0 ) continue
|
||||
if(angle == 360) continue
|
||||
temp = icon(base)
|
||||
if(aa) temp.Scale(w2, h2)
|
||||
temp.Turn(angle)
|
||||
if(aa) temp.Scale(w, h)
|
||||
result.Insert(temp, "[angle]")
|
||||
|
||||
return result
|
||||
|
||||
/proc/format_text(text)
|
||||
return replacetext(replacetext(text,"\proper ",""),"\improper ","")
|
||||
|
||||
|
||||
@@ -341,7 +341,7 @@
|
||||
L << sound(sound, repeat = 0, wait = 0, volume = 25, channel = CHANNEL_AMBIENCE)
|
||||
L.client.played = 1
|
||||
spawn(600) //ewww - this is very very bad
|
||||
if(L.&& L.client)
|
||||
if(L && L.client)
|
||||
L.client.played = 0
|
||||
|
||||
/area/proc/gravitychange(var/gravitystate = 0, var/area/A)
|
||||
@@ -362,7 +362,7 @@
|
||||
if(istype(get_turf(M), /turf/space)) // Can't fall onto nothing.
|
||||
return
|
||||
|
||||
if((istype(M,/mob/living/carbon/human/)) && (M.m_intent == MOVE_INTENT_RUN)).
|
||||
if((istype(M,/mob/living/carbon/human/)) && (M.m_intent == MOVE_INTENT_RUN))
|
||||
M.Stun(5)
|
||||
M.Weaken(5)
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@
|
||||
return
|
||||
message_sent = TRUE
|
||||
if(user.mind && user.mind.special_role == SPECIAL_ROLE_TRAITOR)
|
||||
var/input = stripped_input(user, "Please choose a message to transmit to Syndicate HQ via quantum entanglement. Transmission does not guarantee a response. This function may only be used ONCE.", "To abort, send an empty message.", "") as text|null
|
||||
var/input = stripped_input(user, "Please choose a message to transmit to Syndicate HQ via quantum entanglement. Transmission does not guarantee a response. This function may only be used ONCE.", "To abort, send an empty message.", "")
|
||||
if(!input)
|
||||
message_sent = FALSE
|
||||
return
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
update_pressure()
|
||||
|
||||
/obj/mecha/working/ripley/Destroy()
|
||||
while(damage_absorption.["brute"] < 0.6)
|
||||
while(damage_absorption["brute"] < 0.6)
|
||||
new /obj/item/asteroid/goliath_hide(loc)
|
||||
damage_absorption.["brute"] = damage_absorption.["brute"] + 0.1 //If a goliath-plated ripley gets killed, all the plates drop
|
||||
damage_absorption["brute"] = damage_absorption["brute"] + 0.1 //If a goliath-plated ripley gets killed, all the plates drop
|
||||
for(var/atom/movable/A in cargo)
|
||||
A.forceMove(loc)
|
||||
step_rand(A)
|
||||
@@ -31,28 +31,28 @@
|
||||
|
||||
/obj/mecha/working/ripley/go_out()
|
||||
..()
|
||||
if(damage_absorption.["brute"] < 0.6 && damage_absorption.["brute"] > 0.3)
|
||||
if(damage_absorption["brute"] < 0.6 && damage_absorption["brute"] > 0.3)
|
||||
overlays = null
|
||||
overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-open")
|
||||
else if(damage_absorption.["brute"] == 0.3)
|
||||
else if(damage_absorption["brute"] == 0.3)
|
||||
overlays = null
|
||||
overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-full-open")
|
||||
|
||||
/obj/mecha/working/ripley/moved_inside(var/mob/living/carbon/human/H as mob)
|
||||
..()
|
||||
if(damage_absorption.["brute"] < 0.6 && damage_absorption.["brute"] > 0.3)
|
||||
if(damage_absorption["brute"] < 0.6 && damage_absorption["brute"] > 0.3)
|
||||
overlays = null
|
||||
overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g")
|
||||
else if(damage_absorption.["brute"] == 0.3)
|
||||
else if(damage_absorption["brute"] == 0.3)
|
||||
overlays = null
|
||||
overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-full")
|
||||
|
||||
/obj/mecha/working/ripley/mmi_moved_inside(var/obj/item/mmi/mmi_as_oc as obj,mob/user as mob)
|
||||
..()
|
||||
if(damage_absorption.["brute"] < 0.6 && damage_absorption.["brute"] > 0.3)
|
||||
if(damage_absorption["brute"] < 0.6 && damage_absorption["brute"] > 0.3)
|
||||
overlays = null
|
||||
overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g")
|
||||
else if(damage_absorption.["brute"] == 0.3)
|
||||
else if(damage_absorption["brute"] == 0.3)
|
||||
overlays = null
|
||||
overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-full")
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
epicenter = get_turf(epicenter.loc)
|
||||
|
||||
if(log)
|
||||
message_admins("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] [cause ? "(Cause: [cause])": ] [ADMIN_COORDJMP(epicenter)]</a>")
|
||||
log_game("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] [cause ? "(Cause: [cause])" : ] [COORD(epicenter)]")
|
||||
message_admins("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] [cause ? "(Cause: [cause])": ""] [ADMIN_COORDJMP(epicenter)]</a>")
|
||||
log_game("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] [cause ? "(Cause: [cause])" : ""] [COORD(epicenter)]")
|
||||
|
||||
if(heavy_range > 1)
|
||||
new/obj/effect/temp_visual/emp/pulse(epicenter)
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
var/list/cached_exp_block = list()
|
||||
|
||||
if(adminlog)
|
||||
message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range], [flame_range]) in area [epicenter.loc.name] [cause ? "(Cause: [cause])" : ] [ADMIN_COORDJMP(epicenter)] ")
|
||||
log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range], [flame_range]) in area [epicenter.loc.name] [cause ? "(Cause: [cause])" : ] [COORD(epicenter)] ")
|
||||
message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range], [flame_range]) in area [epicenter.loc.name] [cause ? "(Cause: [cause])" : ""] [ADMIN_COORDJMP(epicenter)] ")
|
||||
log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range], [flame_range]) in area [epicenter.loc.name] [cause ? "(Cause: [cause])" : ""] [COORD(epicenter)] ")
|
||||
|
||||
// Play sounds; we want sounds to be different depending on distance so we will manually do it ourselves.
|
||||
// Stereo users will also hear the direction of the explosion!
|
||||
|
||||
@@ -43,7 +43,6 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
tumbler_2_open = rand(0, 99)
|
||||
|
||||
tumbler_1_pos = rand(0, 99)
|
||||
do
|
||||
tumbler_1_open = rand(0, 99)
|
||||
while(tumbler_1_open > Wrap(tumbler_2_open +48, 0, 100) && tumbler_1_open < Wrap(tumbler_2_open + 53, 0, 100)) // prevents a combination that wont open
|
||||
do
|
||||
|
||||
@@ -316,7 +316,7 @@ var/global/nologevent = 0
|
||||
if(CHANNEL.is_admin_channel)
|
||||
dat+="<B><FONT style='BACKGROUND-COLOR: LightGreen'><A href='?src=[UID()];ac_show_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A></FONT></B><BR>"
|
||||
else
|
||||
dat+="<B><A href='?src=[UID()];ac_show_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : ()]<BR></B>"
|
||||
dat+="<B><A href='?src=[UID()];ac_show_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : ""]<BR></B>"
|
||||
dat+={"<BR><HR><A href='?src=[UID()];ac_refresh=1'>Refresh</A>
|
||||
<BR><A href='?src=[UID()];ac_setScreen=[0]'>Back</A>
|
||||
"}
|
||||
@@ -400,7 +400,7 @@ var/global/nologevent = 0
|
||||
dat+="<I>No feed channels found active...</I><BR>"
|
||||
else
|
||||
for(var/datum/feed_channel/CHANNEL in news_network.network_channels)
|
||||
dat+="<A href='?src=[UID()];ac_pick_censor_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : ()]<BR>"
|
||||
dat+="<A href='?src=[UID()];ac_pick_censor_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : ""]<BR>"
|
||||
dat+="<BR><A href='?src=[UID()];ac_setScreen=[0]'>Cancel</A>"
|
||||
if(11)
|
||||
dat+={"
|
||||
@@ -413,7 +413,7 @@ var/global/nologevent = 0
|
||||
dat+="<I>No feed channels found active...</I><BR>"
|
||||
else
|
||||
for(var/datum/feed_channel/CHANNEL in news_network.network_channels)
|
||||
dat+="<A href='?src=[UID()];ac_pick_d_notice=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : ()]<BR>"
|
||||
dat+="<A href='?src=[UID()];ac_pick_d_notice=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : ""]<BR>"
|
||||
|
||||
dat+="<BR><A href='?src=[UID()];ac_setScreen=[0]'>Back</A>"
|
||||
if(12)
|
||||
|
||||
@@ -46,17 +46,17 @@
|
||||
if(!M.id || M.id == "")
|
||||
M.id = input(user, "Please select an ID for the button", "Buildmode", "")
|
||||
if(!M.id || M.id == "")
|
||||
goto(line_jump)
|
||||
goto line_jump
|
||||
if(P.id_tag == M.id && P.id_tag && P.id_tag != "")
|
||||
P.id_tag = null
|
||||
to_chat(user, "[P] unlinked.")
|
||||
goto(line_jump)
|
||||
goto line_jump
|
||||
if(!M.normaldoorcontrol)
|
||||
if(link_lines.len && alert(user, "Warning: This will disable links to connected pod doors. Continue?", "Buildmode", "Yes", "No") == "No")
|
||||
goto(line_jump)
|
||||
goto line_jump
|
||||
M.normaldoorcontrol = 1
|
||||
if(P.id_tag && alert(user, "Warning: This will unlink something else from the door. Continue?", "Buildmode", "Yes", "No") == "No")
|
||||
goto(line_jump)
|
||||
goto line_jump
|
||||
P.id_tag = M.id
|
||||
if(istype(link_obj, /obj/machinery/door_control) && istype(object, /obj/machinery/door/poddoor))
|
||||
var/obj/machinery/door_control/M = link_obj
|
||||
@@ -64,21 +64,21 @@
|
||||
if(!M.id || M.id == "")
|
||||
M.id = input(user, "Please select an ID for the button", "Buildmode", "")
|
||||
if(!M.id || M.id == "")
|
||||
goto(line_jump)
|
||||
goto line_jump
|
||||
if(P.id_tag == M.id && P.id_tag && P.id_tag != "")
|
||||
P.id_tag = null
|
||||
to_chat(user, "[P] unlinked.")
|
||||
goto(line_jump)
|
||||
goto line_jump
|
||||
if(M.normaldoorcontrol)
|
||||
if(link_lines.len && alert(user, "Warning: This will disable links to connected airlocks. Continue?", "Buildmode", "Yes", "No") == "No")
|
||||
goto(line_jump)
|
||||
goto line_jump
|
||||
M.normaldoorcontrol = 0
|
||||
if(!M.id || M.id == "")
|
||||
M.id = input(user, "Please select an ID for the button", "Buildmode", "")
|
||||
if(!M.id || M.id == "")
|
||||
goto(line_jump)
|
||||
goto line_jump
|
||||
if(P.id_tag && P.id_tag != 1 && alert(user, "Warning: This will unlink something else from the door. Continue?", "Buildmode", "Yes", "No") == "No")
|
||||
goto(line_jump)
|
||||
goto line_jump
|
||||
P.id_tag = M.id
|
||||
|
||||
line_jump // For the goto
|
||||
|
||||
@@ -60,12 +60,3 @@
|
||||
stat(null,"<font color='#298A08'><b>[description_holders["fluff"]]</b></font>") //Yellow, fluff-related text.
|
||||
if(description_holders["antag"])
|
||||
stat(null,"<font color='#8A0808'><b>[description_holders["antag"]]</b></font>") //Red, malicious antag-related text
|
||||
|
||||
//override examinate verb to update description holders when things are examined
|
||||
/mob/examinate(atom/A as mob|obj|turf in view())
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
var/is_antag = (isAntag(src) || isobserver(src)) //ghosts don't have minds
|
||||
if(client)
|
||||
client.update_description_holders(A, is_antag)
|
||||
|
||||
@@ -64,9 +64,8 @@ proc/Ellipsis(original_msg, chance = 50)
|
||||
if(chance <= 0) return "..."
|
||||
if(chance >= 100) return original_msg
|
||||
|
||||
var/list
|
||||
words = splittext(original_msg," ")
|
||||
new_words = list()
|
||||
var/list/words = splittext(original_msg," ")
|
||||
var/list/new_words = list()
|
||||
|
||||
var/new_msg = ""
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
if(jobban_isbanned(O, "Cyborg") || jobban_isbanned(O,"nonhumandept"))
|
||||
to_chat(O, "<span class='warning'>You are job banned from this role.</span>")
|
||||
return
|
||||
to_chat(O., "<span class='notice'>You've been added to the list of ghosts that may become this [src]. Click again to unvolunteer.</span>")
|
||||
to_chat(O, "<span class='notice'>You've been added to the list of ghosts that may become this [src]. Click again to unvolunteer.</span>")
|
||||
ghost_volunteers.Add(O)
|
||||
|
||||
|
||||
|
||||
@@ -238,8 +238,8 @@
|
||||
if(istype(target, /obj/item/clothing/suit/space/hardsuit/mining) || istype(target, /obj/item/clothing/head/helmet/space/hardsuit/mining) || istype(target, /obj/item/clothing/suit/space/eva/plasmaman/miner) || istype(target, /obj/item/clothing/head/helmet/space/eva/plasmaman/miner))
|
||||
var/obj/item/clothing/C = target
|
||||
var/current_armor = C.armor
|
||||
if(current_armor.["melee"] < 60)
|
||||
current_armor.["melee"] = min(current_armor.["melee"] + 10, 60)
|
||||
if(current_armor["melee"] < 60)
|
||||
current_armor["melee"] = min(current_armor["melee"] + 10, 60)
|
||||
to_chat(user, "<span class='info'>You strengthen [target], improving its resistance against melee attacks.</span>")
|
||||
qdel(src)
|
||||
else
|
||||
@@ -260,7 +260,7 @@
|
||||
qdel(src)
|
||||
D.overlays += image("icon"="mecha.dmi", "icon_state"="ripley-g-open")
|
||||
D.desc = "Autonomous Power Loader Unit. Its armour is enhanced with some goliath hide plates."
|
||||
if(damage_absorption.["brute"] == 0.3)
|
||||
if(damage_absorption["brute"] == 0.3)
|
||||
D.overlays += image("icon"="mecha.dmi", "icon_state"="ripley-g-full-open")
|
||||
D.desc = "Autonomous Power Loader Unit. It's wearing a fearsome carapace entirely composed of goliath hide plates - the pilot must be an experienced monster hunter."
|
||||
else
|
||||
|
||||
@@ -580,6 +580,10 @@ var/list/slot_equipment_priority = list( \
|
||||
to_chat(src, "<span class='notice'>Something is there but you can't see it.</span>")
|
||||
return 1
|
||||
|
||||
var/is_antag = (isAntag(src) || isobserver(src)) //ghosts don't have minds
|
||||
if(client)
|
||||
client.update_description_holders(A, is_antag)
|
||||
|
||||
face_atom(A)
|
||||
A.examine(src)
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
usr << browse(dat + "<html><head><title>[P.name]</title></head>" \
|
||||
+ "<body style='overflow:hidden'>" \
|
||||
+ "<div> <img src='tmp_photo.png' width = '180'" \
|
||||
+ "[P.scribble ? "<div><br> Written on the back:<br><i>[P.scribble]</i>" : ]"\
|
||||
+ "[P.scribble ? "<div><br> Written on the back:<br><i>[P.scribble]</i>" : ""]"\
|
||||
+ "</body></html>", "window=[name]")
|
||||
|
||||
/obj/item/paper_bundle/attack_self(mob/user as mob)
|
||||
|
||||
Reference in New Issue
Block a user