Merge pull request #2380 from Citadel-Station-13/upstream-merge-29812
[MIRROR] Annihilates the colons!
This commit is contained in:
@@ -320,7 +320,7 @@
|
||||
return r
|
||||
|
||||
// Returns the key based on the index
|
||||
#define KEYBYINDEX(L, index) (((index <= L:len) && (index > 0)) ? L[index] : null)
|
||||
#define KEYBYINDEX(L, index) (((index <= length(L)) && (index > 0)) ? L[index] : null)
|
||||
|
||||
/proc/count_by_type(list/L, type)
|
||||
var/i = 0
|
||||
@@ -468,7 +468,7 @@
|
||||
. |= key_list[key]
|
||||
|
||||
//Picks from the list, with some safeties, and returns the "default" arg if it fails
|
||||
#define DEFAULTPICK(L, default) ((islist(L) && L:len) ? pick(L) : default)
|
||||
#define DEFAULTPICK(L, default) ((islist(L) && length(L)) ? pick(L) : default)
|
||||
#define LAZYINITLIST(L) if (!L) L = list()
|
||||
#define UNSETEMPTY(L) if (L && !L.len) L = null
|
||||
#define LAZYREMOVE(L, I) if(L) { L -= I; if(!L.len) { L = null; } }
|
||||
|
||||
+15
-13
@@ -712,7 +712,8 @@ The _flatIcons list is a cache for generated icon files.
|
||||
if(!current)
|
||||
curIndex++ //Try the next layer
|
||||
continue
|
||||
currentLayer = current:layer
|
||||
var/image/I = current
|
||||
currentLayer = I.layer
|
||||
if(currentLayer<0) // Special case for FLY_LAYER
|
||||
if(currentLayer <= -1000) return flat
|
||||
if(pSet == 0) // Underlay
|
||||
@@ -747,22 +748,22 @@ The _flatIcons list is a cache for generated icon files.
|
||||
// Dimensions of overlay being added
|
||||
var/{addX1;addX2;addY1;addY2}
|
||||
|
||||
for(var/I in layers)
|
||||
|
||||
if(I:alpha == 0)
|
||||
for(var/V in layers)
|
||||
var/image/I = V
|
||||
if(I.alpha == 0)
|
||||
continue
|
||||
|
||||
if(I == copy) // 'I' is an /image based on the object being flattened.
|
||||
curblend = BLEND_OVERLAY
|
||||
add = icon(I:icon, I:icon_state, I:dir)
|
||||
add = icon(I.icon, I.icon_state, I.dir)
|
||||
else // 'I' is an appearance object.
|
||||
add = getFlatIcon(new/image(I), curdir, curicon, curstate, curblend)
|
||||
|
||||
// Find the new dimensions of the flat icon to fit the added overlay
|
||||
addX1 = min(flatX1, I:pixel_x+1)
|
||||
addX2 = max(flatX2, I:pixel_x+add.Width())
|
||||
addY1 = min(flatY1, I:pixel_y+1)
|
||||
addY2 = max(flatY2, I:pixel_y+add.Height())
|
||||
addX1 = min(flatX1, I.pixel_x+1)
|
||||
addX2 = max(flatX2, I.pixel_x+add.Width())
|
||||
addY1 = min(flatY1, I.pixel_y+1)
|
||||
addY2 = max(flatY2, I.pixel_y+add.Height())
|
||||
|
||||
if(addX1!=flatX1 || addX2!=flatX2 || addY1!=flatY1 || addY2!=flatY2)
|
||||
// Resize the flattened icon so the new icon fits
|
||||
@@ -771,7 +772,7 @@ The _flatIcons list is a cache for generated icon files.
|
||||
flatY1=addY1;flatY2=addY2
|
||||
|
||||
// Blend the overlay into the flattened icon
|
||||
flat.Blend(add, blendMode2iconMode(curblend), I:pixel_x + 2 - flatX1, I:pixel_y + 2 - flatY1)
|
||||
flat.Blend(add, blendMode2iconMode(curblend), I.pixel_x + 2 - flatX1, I.pixel_y + 2 - flatY1)
|
||||
|
||||
if(A.color)
|
||||
flat.Blend(A.color, ICON_MULTIPLY)
|
||||
@@ -782,10 +783,11 @@ The _flatIcons list is a cache for generated icon files.
|
||||
|
||||
/proc/getIconMask(atom/A)//By yours truly. Creates a dynamic mask for a mob/whatever. /N
|
||||
var/icon/alpha_mask = new(A.icon,A.icon_state)//So we want the default icon and icon state of A.
|
||||
for(var/I in A.overlays)//For every image in overlays. var/image/I will not work, don't try it.
|
||||
if(I:layer>A.layer)
|
||||
for(var/V in A.overlays)//For every image in overlays. var/image/I will not work, don't try it.
|
||||
var/image/I = V
|
||||
if(I.layer>A.layer)
|
||||
continue//If layer is greater than what we need, skip it.
|
||||
var/icon/image_overlay = new(I:icon,I:icon_state)//Blend only works with icon objects.
|
||||
var/icon/image_overlay = new(I.icon,I.icon_state)//Blend only works with icon objects.
|
||||
//Also, icons cannot directly set icon_state. Slower than changing variables but whatever.
|
||||
alpha_mask.Blend(image_overlay,ICON_OR)//OR so they are lumped together in a nice overlay.
|
||||
return alpha_mask//And now return the mask.
|
||||
|
||||
+6
-6
@@ -805,11 +805,11 @@
|
||||
possible_targets += possible_target.current
|
||||
|
||||
var/mob/def_target = null
|
||||
var/objective_list[] = list(/datum/objective/assassinate, /datum/objective/protect, /datum/objective/debrain, /datum/objective/maroon)
|
||||
if (objective&&(objective.type in objective_list) && objective:target)
|
||||
def_target = objective:target.current
|
||||
var/list/objective_list = typecacheof(list(/datum/objective/assassinate, /datum/objective/protect, /datum/objective/debrain, /datum/objective/maroon))
|
||||
if (is_type_in_typecache(objective, objective_list) && objective.target)
|
||||
def_target = objective.target.current
|
||||
|
||||
var/new_target = input("Select target:", "Objective target", def_target) as null|anything in possible_targets
|
||||
var/mob/new_target = input("Select target:", "Objective target", def_target) as null|anything in possible_targets
|
||||
if (!new_target)
|
||||
return
|
||||
|
||||
@@ -817,12 +817,12 @@
|
||||
if (new_target == "Free objective")
|
||||
new_objective = new objective_path
|
||||
new_objective.owner = src
|
||||
new_objective:target = null
|
||||
new_objective.target = null
|
||||
new_objective.explanation_text = "Free objective"
|
||||
else
|
||||
new_objective = new objective_path
|
||||
new_objective.owner = src
|
||||
new_objective:target = new_target:mind
|
||||
new_objective.target = new_target.mind
|
||||
//Will display as special role if the target is set as MODE. Ninjas/commandos/nuke ops.
|
||||
new_objective.update_explanation_text()
|
||||
|
||||
|
||||
@@ -292,7 +292,7 @@ GLOBAL_VAR_INIT(RADIO_MAGNETS, "9")
|
||||
|
||||
/datum/signal/proc/debug_print()
|
||||
if (source)
|
||||
. = "signal = {source = '[source]' ([source:x],[source:y],[source:z])\n"
|
||||
. = "signal = {source = '[source]' [COORD(source)]\n"
|
||||
else
|
||||
. = "signal = {source = '[source]' ()\n"
|
||||
for (var/i in data)
|
||||
|
||||
@@ -96,7 +96,8 @@
|
||||
colour2 = rgb(255,128,0)
|
||||
|
||||
if(ismob(AM))
|
||||
if(AM:client)
|
||||
var/mob/M = AM
|
||||
if(M.client)
|
||||
colour = rgb(255,0,0)
|
||||
else
|
||||
colour = rgb(255,128,128)
|
||||
@@ -242,7 +243,8 @@
|
||||
colour = rgb(255,255,0)
|
||||
|
||||
if(ismob(AM))
|
||||
if(AM:client)
|
||||
var/mob/M = AM
|
||||
if(M.client)
|
||||
colour = rgb(255,0,0)
|
||||
else
|
||||
colour = rgb(255,128,128)
|
||||
|
||||
@@ -11,31 +11,29 @@
|
||||
idle_power_usage = 20
|
||||
active_power_usage = 5000
|
||||
|
||||
/obj/machinery/robotic_fabricator/attackby(obj/item/O, mob/user, params)
|
||||
/obj/machinery/robotic_fabricator/attackby(obj/item/O, mob/living/user, params)
|
||||
if (istype(O, /obj/item/stack/sheet/metal))
|
||||
if (src.metal_amount < 150000)
|
||||
var/count = 0
|
||||
src.add_overlay("fab-load-metal")
|
||||
spawn(15)
|
||||
if(O)
|
||||
if(!O:amount)
|
||||
return
|
||||
while(metal_amount < 150000 && O:amount)
|
||||
src.metal_amount += O:materials[MAT_METAL] /*O:height * O:width * O:length * 100000*/
|
||||
O:amount--
|
||||
count++
|
||||
|
||||
if (O:amount < 1)
|
||||
qdel(O)
|
||||
|
||||
to_chat(user, "<span class='notice'>You insert [count] metal sheet\s into \the [src].</span>")
|
||||
cut_overlay("fab-load-metal")
|
||||
updateDialog()
|
||||
if (metal_amount < 150000)
|
||||
add_overlay("fab-load-metal")
|
||||
addtimer(CALLBACK(src, .proc/FinishLoadingMetal, O, user), 15)
|
||||
else
|
||||
to_chat(user, "\The [src] is full.")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/robotic_fabricator/proc/FinishLoadingMetal(obj/item/stack/sheet/metal/M, mob/living/user)
|
||||
cut_overlay("fab-load-metal")
|
||||
if(QDELETED(M) || QDELETED(user))
|
||||
return
|
||||
var/count = 0
|
||||
while(metal_amount < 150000 && !QDELETED(M))
|
||||
metal_amount += M.materials[MAT_METAL]
|
||||
M.use(1)
|
||||
count++
|
||||
|
||||
to_chat(user, "<span class='notice'>You insert [count] metal sheet\s into \the [src].</span>")
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/robotic_fabricator/power_change()
|
||||
if (powered())
|
||||
stat &= ~NOPOWER
|
||||
|
||||
@@ -713,8 +713,8 @@
|
||||
AI.remote_control = src
|
||||
AI.canmove = 1 //Much easier than adding AI checks! Be sure to set this back to 0 if you decide to allow an AI to leave a mech somehow.
|
||||
AI.can_shunt = 0 //ONE AI ENTERS. NO AI LEAVES.
|
||||
to_chat(AI, "[AI.can_dominate_mechs ? "<span class='announce'>Takeover of [name] complete! You are now loaded onto the onboard computer. Do not attempt to leave the station sector!</span>" \
|
||||
: "<span class='notice'>You have been uploaded to a mech's onboard computer."]")
|
||||
to_chat(AI, AI.can_dominate_mechs ? "<span class='announce'>Takeover of [name] complete! You are now loaded onto the onboard computer. Do not attempt to leave the station sector!</span>" :\
|
||||
"<span class='notice'>You have been uploaded to a mech's onboard computer.</span>")
|
||||
to_chat(AI, "<span class='reallybig boldnotice'>Use Middle-Mouse to activate mech functions and equipment. Click normally for AI interactions.</span>")
|
||||
if(interaction == AI_TRANS_FROM_CARD)
|
||||
GrantActions(AI, FALSE) //No eject/return to core action for AI uploaded by card
|
||||
|
||||
@@ -147,7 +147,7 @@ MASS SPECTROMETER
|
||||
if (M.getCloneLoss())
|
||||
to_chat(user, "\t<span class='alert'>Subject appears to have [M.getCloneLoss() > 30 ? "severe" : "minor"] cellular damage.</span>")
|
||||
if (M.reagents && M.reagents.get_reagent_amount("epinephrine"))
|
||||
to_chat(user, "\t<span class='info'>Bloodstream analysis located [M.reagents:get_reagent_amount("epinephrine")] units of rejuvenation chemicals.</span>")
|
||||
to_chat(user, "\t<span class='info'>Bloodstream analysis located [M.reagents.get_reagent_amount("epinephrine")] units of rejuvenation chemicals.</span>")
|
||||
if (M.getBrainLoss() >= 100 || !M.getorgan(/obj/item/organ/brain))
|
||||
to_chat(user, "\t<span class='alert'>Subject brain function is non-existent.</span>")
|
||||
else if (M.getBrainLoss() >= 60)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
desc = "Regulates the transfer of air between two tanks"
|
||||
var/obj/item/weapon/tank/tank_one
|
||||
var/obj/item/weapon/tank/tank_two
|
||||
var/obj/item/device/attached_device
|
||||
var/obj/item/device/assembly/attached_device
|
||||
var/mob/attacher = null
|
||||
var/valve_open = FALSE
|
||||
var/toggle = 1
|
||||
@@ -99,8 +99,8 @@
|
||||
toggle_valve()
|
||||
else if(attached_device)
|
||||
if(href_list["rem_device"])
|
||||
attached_device.loc = get_turf(src)
|
||||
attached_device:holder = null
|
||||
attached_device.forceMove(get_turf(src))
|
||||
attached_device.holder = null
|
||||
attached_device = null
|
||||
update_icon()
|
||||
if(href_list["device"])
|
||||
|
||||
@@ -83,10 +83,10 @@
|
||||
var/a_computerid
|
||||
var/a_ip
|
||||
|
||||
if(src.owner && istype(src.owner, /client))
|
||||
a_ckey = src.owner:ckey
|
||||
a_computerid = src.owner:computer_id
|
||||
a_ip = src.owner:address
|
||||
if(istype(owner))
|
||||
a_ckey = owner.ckey
|
||||
a_computerid = owner.computer_id
|
||||
a_ip = owner.address
|
||||
|
||||
if(blockselfban)
|
||||
if(a_ckey == ckey)
|
||||
@@ -309,12 +309,12 @@
|
||||
to_chat(usr, "<span class='danger'>Database update failed due to multiple bans having the same ID. Contact the database admin.</span>")
|
||||
return
|
||||
|
||||
if(!src.owner || !istype(src.owner, /client))
|
||||
if(!istype(owner))
|
||||
return
|
||||
|
||||
var/unban_ckey = src.owner:ckey
|
||||
var/unban_computerid = src.owner:computer_id
|
||||
var/unban_ip = src.owner:address
|
||||
var/unban_ckey = owner.ckey
|
||||
var/unban_computerid = owner.computer_id
|
||||
var/unban_ip = owner.address
|
||||
|
||||
var/sql_update = "UPDATE [format_table_name("ban")] SET unbanned = 1, unbanned_datetime = Now(), unbanned_ckey = '[unban_ckey]', unbanned_computerid = '[unban_computerid]', unbanned_ip = INET_ATON('[unban_ip]') WHERE id = [id]"
|
||||
var/datum/DBQuery/query_unban = SSdbcore.NewQuery(sql_update)
|
||||
|
||||
@@ -84,11 +84,11 @@
|
||||
var/list/keys = list()
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
keys += M.client
|
||||
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
|
||||
var/client/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
|
||||
if(!selection)
|
||||
to_chat(src, "No keys found.")
|
||||
return
|
||||
var/mob/M = selection:mob
|
||||
var/mob/M = selection.mob
|
||||
log_admin("[key_name(usr)] jumped to [key_name(M)]")
|
||||
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]")
|
||||
|
||||
|
||||
@@ -316,10 +316,8 @@ GLOBAL_PROTECT(AdminProcCallCount)
|
||||
alert("Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
log_admin("[key_name(src)] has alienized [M.key].")
|
||||
spawn(0)
|
||||
M:Alienize()
|
||||
SSblackbox.add_details("admin_verb","Make Alien") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
INVOKE_ASYNC(M, /mob/living/carbon/human/proc/Alienize)
|
||||
SSblackbox.add_details("admin_verb","Make Alien") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] made [key_name(M)] into an alien.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made [key_name(M)] into an alien.</span>")
|
||||
else
|
||||
@@ -333,10 +331,8 @@ GLOBAL_PROTECT(AdminProcCallCount)
|
||||
alert("Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
log_admin("[key_name(src)] has slimeized [M.key].")
|
||||
spawn(0)
|
||||
M:slimeize()
|
||||
SSblackbox.add_details("admin_verb","Make Slime") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
INVOKE_ASYNC(M, /mob/living/carbon/human/proc/slimeize)
|
||||
SSblackbox.add_details("admin_verb","Make Slime") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] made [key_name(M)] into a slime.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made [key_name(M)] into a slime.</span>")
|
||||
else
|
||||
@@ -461,12 +457,14 @@ GLOBAL_PROTECT(AdminProcCallCount)
|
||||
|
||||
if(worn)
|
||||
if(istype(worn, /obj/item/device/pda))
|
||||
worn:id = id
|
||||
id.loc = worn
|
||||
var/obj/item/device/pda/PDA = worn
|
||||
PDA.id = id
|
||||
id.forceMove(PDA)
|
||||
else if(istype(worn, /obj/item/weapon/storage/wallet))
|
||||
worn:front_id = id
|
||||
id.loc = worn
|
||||
worn.update_icon()
|
||||
var/obj/item/weapon/storage/wallet/W = worn
|
||||
W.front_id = id
|
||||
id.forceMove(W)
|
||||
W.update_icon()
|
||||
else
|
||||
H.equip_to_slot(id,slot_wear_id)
|
||||
|
||||
|
||||
@@ -78,8 +78,9 @@
|
||||
continue
|
||||
output += " [filters[filter]]: [f.len]<br>"
|
||||
for (var/device in f)
|
||||
if (isobj(device))
|
||||
output += " [device] ([device:x],[device:y],[device:z] in area [get_area(device:loc)])<br>"
|
||||
if (istype(device, /atom))
|
||||
var/atom/A = device
|
||||
output += " [device] ([A.x],[A.y],[A.z] in area [get_area(device)])<br>"
|
||||
else
|
||||
output += " [device]<br>"
|
||||
|
||||
|
||||
@@ -44,7 +44,8 @@
|
||||
|
||||
qdel(src)
|
||||
return
|
||||
if((istype(W, /obj/item/weapon/weldingtool) && W:welding))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if((istype(WT) && WT.welding))
|
||||
if(!status)
|
||||
status = TRUE
|
||||
GLOB.bombers += "[key_name(user)] welded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]"
|
||||
|
||||
@@ -71,21 +71,21 @@
|
||||
name = "ghost chili"
|
||||
desc = "It seems to be vibrating gently."
|
||||
icon_state = "ghostchilipepper"
|
||||
var/mob/held_mob
|
||||
var/mob/living/carbon/human/held_mob
|
||||
filling_color = "#F8F8FF"
|
||||
bitesize_mod = 4
|
||||
origin_tech = "biotech=4;magnets=5"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/ghost_chili/attack_hand(mob/user)
|
||||
..()
|
||||
if( ismob(src.loc) )
|
||||
held_mob = src.loc
|
||||
if( ismob(loc) )
|
||||
held_mob = loc
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/ghost_chili/process()
|
||||
if(held_mob && src.loc == held_mob)
|
||||
if(held_mob && loc == held_mob)
|
||||
if(held_mob.is_holding(src))
|
||||
if(hasvar(held_mob,"gloves") && held_mob:gloves)
|
||||
if(istype(held_mob) && held_mob.gloves)
|
||||
return
|
||||
held_mob.bodytemperature += 15 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(prob(10))
|
||||
|
||||
@@ -51,9 +51,10 @@
|
||||
|
||||
var/obj/item/item_in_hand = src.get_active_held_item()
|
||||
if(item_in_hand) //this segment checks if the item in your hand is twohanded.
|
||||
if(istype(item_in_hand, /obj/item/weapon/twohanded))
|
||||
if(item_in_hand:wielded == 1)
|
||||
to_chat(usr, "<span class='warning'>Your other hand is too busy holding the [item_in_hand.name]</span>")
|
||||
var/obj/item/weapon/twohanded/TH = item_in_hand
|
||||
if(istype(TH))
|
||||
if(TH.wielded == 1)
|
||||
to_chat(usr, "<span class='warning'>Your other hand is too busy holding [TH]</span>")
|
||||
return
|
||||
var/oindex = active_hand_index
|
||||
active_hand_index = held_index
|
||||
|
||||
@@ -619,7 +619,8 @@
|
||||
src.paiInterface()
|
||||
if(hackprogress >= 100)
|
||||
src.hackprogress = 0
|
||||
src.cable.machine:open()
|
||||
var/obj/machinery/door/D = cable.machine
|
||||
D.open()
|
||||
sleep(50) // Update every 5 seconds
|
||||
|
||||
// Digital Messenger
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
addtimer(CALLBACK(src, .proc/deinitialize_three, delay, U), delay)
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/deinitialize_three(delay, mob/living/carbon/human/U)
|
||||
to_chat(U, "<span class='notice'>Logging off, [U:real_name]. Shutting down <B>SpiderOS</B>.</span>")
|
||||
to_chat(U, "<span class='notice'>Logging off, [U.real_name]. Shutting down <B>SpiderOS</B>.</span>")
|
||||
addtimer(CALLBACK(src, .proc/deinitialize_four, delay, U), delay)
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/deinitialize_four(delay, mob/living/carbon/human/U)
|
||||
|
||||
@@ -222,8 +222,9 @@
|
||||
var/offX = 32 * (A.x - center.x) + A.pixel_x + 33
|
||||
var/offY = 32 * (A.y - center.y) + A.pixel_y + 33
|
||||
if(ismovableatom(A))
|
||||
offX += A:step_x
|
||||
offY += A:step_y
|
||||
var/atom/movable/AM = A
|
||||
offX += AM.step_x
|
||||
offY += AM.step_y
|
||||
|
||||
res.Blend(img, blendMode2iconMode(A.blend_mode), offX, offY)
|
||||
|
||||
|
||||
@@ -390,7 +390,7 @@
|
||||
T.MakeSlippery(min_wet_time = 10, wet_time_to_add = reac_volume*2)
|
||||
var/obj/effect/hotspot/hotspot = (locate(/obj/effect/hotspot) in T)
|
||||
if(hotspot)
|
||||
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
|
||||
var/datum/gas_mixture/lowertemp = T.remove_air(T.air.total_moles())
|
||||
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
|
||||
lowertemp.react()
|
||||
T.assume_air(lowertemp)
|
||||
|
||||
Reference in New Issue
Block a user