aboutsummaryrefslogtreecommitdiff
path: root/src/network/connection.h
Commit message (Expand)AuthorAge
* Add session_t typedef + remove unused functions (#6470)Loïc Blot2017-09-27
* Use a Buffer instead of SharedBuffer in ConnectionCommandLoic Blot2017-09-05
* Re-apply previous commit with a typo fixLoïc Blot2017-09-04
* Revert "Network: fix a concurrency problem, by re-adding a copy in Connection...Loïc Blot2017-09-04
* Network: fix a concurrency problem, by re-adding a copy in ConnectionCommandLoïc Blot2017-09-04
* Network part requires SharedBuffers to be pass as valueLoic Blot2017-09-03
* Network cleanup (#6310)Loïc Blot2017-08-25
* Network cleanup (#6302)Loïc Blot2017-08-24
* Modernize source code: last part (#6285)Loïc Blot2017-08-20
* Code modernization: subfolders (#6283)Loïc Blot2017-08-19
* C++ modernize: Pragma once (#6264)Loïc Blot2017-08-17
* Cleanup various headers to reduce compilation times (#6255)Loïc Blot2017-08-16
* server.cpp: code modernizationLoic Blot2017-08-15
* C++11 cleanup on constructors dir network (#6021)Vincent Glize2017-06-21
* Use C++11 mutexes only (remove compat code) (#5922)Loïc Blot2017-06-06
* Time: Change old `u32` timestamps to 64-bit (#5818)SmallJoker2017-05-26
* Fix Travis/unittest broken since b662a45SmallJoker2017-04-29
* Fix various performance issues reported by cppcheck (#5628)Loïc Blot2017-04-21
* Fix various copy instead of const ref reported by cppcheck (part 3) (#5616)Loïc Blot2017-04-20
* Tolerate packet reordering in the early init processest312016-05-22
* Clean up threadingShadowNinja2015-08-23
* Remove unused function from connection.{cpp,h}nerzhul2015-08-15
* Fix BufferedPacket race condition (fixes #2983)kwolekr2015-08-06
* src/network/connection.h: Fix race conditionBřetislav Štec2015-08-01
* connection.cpp: remove unused constructorLoic Blot2015-07-14
* Fix uninitialized variabled in ConnectionEventLoic Blot2015-04-05
* Connection::Receive(): receive Network Packet instead of SharedBuffer<u8>.Loic Blot2015-03-31
* queued_commands must be a std::deque. RunCommandQueues needs to push packet o...Loic Blot2015-03-29
* Remove unused ConnectionCommand::sendToAll function. NetworkPacket::oldForgeP...Loic Blot2015-03-22
* For usages of assert() that are meant to persist in Release builds (when NDEB...Craig Robbins2015-03-07
* Remove Queue class which uses std::list and use native std::queueLoic Blot2015-03-05
* [Patch 2/4] Network rework: packet writing, sending and cleanupsLoic Blot2015-02-16
> selected_mod ~= nil then local modscreenshot = nil --check for screenshot beeing available local screenshotfilename = selected_mod.path .. DIR_DELIM .. "screenshot.png" local error = nil local screenshotfile,error = io.open(screenshotfilename,"r") if error == nil then screenshotfile:close() modscreenshot = screenshotfilename end if modscreenshot == nil then modscreenshot = modstore.basetexturedir .. "no_screenshot.png" end retval = retval .. "image[5.5,0;3,2;" .. core.formspec_escape(modscreenshot) .. "]" .. "label[8.25,0.6;" .. selected_mod.name .. "]" local descriptionlines = nil error = nil local descriptionfilename = selected_mod.path .. "description.txt" local descriptionfile,error = io.open(descriptionfilename,"r") if error == nil then local descriptiontext = descriptionfile:read("*all") descriptionlines = core.splittext(descriptiontext,42) descriptionfile:close() else descriptionlines = {} table.insert(descriptionlines,fgettext("No mod description available")) end retval = retval .. "label[5.5,1.7;".. fgettext("Mod information:") .. "]" .. "textlist[5.5,2.2;6.2,2.4;description;" for i=1,#descriptionlines,1 do retval = retval .. core.formspec_escape(descriptionlines[i]) .. "," end if selected_mod.is_modpack then retval = retval .. ";0]" .. "button[10,4.85;2,0.5;btn_mod_mgr_rename_modpack;" .. fgettext("Rename") .. "]" retval = retval .. "button[5.5,4.85;4.5,0.5;btn_mod_mgr_delete_mod;" .. fgettext("Uninstall selected modpack") .. "]" else --show dependencies retval = retval .. ",Depends:," local toadd = modmgr.get_dependencies(selected_mod.path) retval = retval .. toadd .. ";0]" retval = retval .. "button[5.5,4.85;4.5,0.5;btn_mod_mgr_delete_mod;" .. fgettext("Uninstall selected mod") .. "]" end end return retval end -------------------------------------------------------------------------------- local function handle_buttons(tabview, fields, tabname, tabdata) if fields["modlist"] ~= nil then local event = core.explode_textlist_event(fields["modlist"]) tabdata.selected_mod = event.index return true end if fields["btn_mod_mgr_install_local"] ~= nil then core.show_file_open_dialog("mod_mgt_open_dlg",fgettext("Select Mod File:")) return true end if fields["btn_modstore"] ~= nil then local modstore_ui = ui.find_by_name("modstore") if modstore_ui ~= nil then tabview:hide() modstore.update_modlist() modstore_ui:show() else print("modstore ui element not found") end return true end if fields["btn_mod_mgr_rename_modpack"] ~= nil then local dlg_renamemp = create_rename_modpack_dlg(tabdata.selected_mod) dlg_renamemp:set_parent(tabview) tabview:hide() dlg_renamemp:show() return true end if fields["btn_mod_mgr_delete_mod"] ~= nil then local dlg_delmod = create_delete_mod_dlg(tabdata.selected_mod) dlg_delmod:set_parent(tabview) tabview:hide() dlg_delmod:show() return true end if fields["mod_mgt_open_dlg_accepted"] ~= nil and fields["mod_mgt_open_dlg_accepted"] ~= "" then modmgr.installmod(fields["mod_mgt_open_dlg_accepted"],nil) return true end return false end -------------------------------------------------------------------------------- tab_mods = { name = "mods", caption = fgettext("Mods"), cbf_formspec = get_formspec, cbf_button_handler = handle_buttons, on_change = gamemgr.update_gamelist }