[–] 30 points 15 hours ago (1 child)

You want to make a place that carves out crazies, good someone should do that. I believe a frontend isnt the place but i also think there is a discussion to be had and an approach where it could work. Most instances already defed these instances already.

You want to crash out and add a bunch of people to a secret blocklist, fine it kills the rep of your project but whatever people can stop using it.

You want to add malicious code to your project, thats disgusting and unironically you should be jailed. You cannot DDOS people because you dont like them. You cannot hijack peoples computers to DDOS. That is unacceptable.

  • source
  • [–] 15 points 15 hours ago (1 child)

    I think a mix of factors, the ones I think about are:

    There is often no fallback. After a certain point there is no one to take care of you so if you fail your options quickly run thin. This leads to feeling increased pressure to do high risk activities.

    I also think men value their lives less. There is a certain line of thought that is in every mans head where they are pissed off and they look at their life and they look at what they're pissed off at and they think "What if I just threw it all away to destroy that thing" at least I could say my life was useful. For most men this check fails because their lives are decent but for people on the bink I can see them thinking its worth to trade their life to take someone elses. If I were in the US i'd probably trade my life for Trump's if I thought i could do it.

    Biology, higher propensity for taking extreme risks, tolerance for violence, physically stronger on average, mentally mature slower, wider distribution across the iq bellcurve. We grow up fighting each other for fun, we see and learn about millions of us dying in wars, we see how failures are treated in society, we see a lot of media showing 'failures' lashing out at society.

  • source
  • [–] 18 points 20 hours ago* (2 children)

    I watched Odyssey Imax in the front row. It was my first time seeing imax and I thought they were trying to sneak a slight looksmaxxing filter on the characters.

  • source
  • [–] 2 points 20 hours ago* (5 children)

    You mean Eggs watching the rest of the kitchen from their private egg basket. I do not get why people put eggs in the fridge, they last a good amount of time just fine sitting out on the bench.

  • source
  • [–] 1 point 1 day ago

    No even ignoring this post the ones on X still get 100k impressions. I wish it werent the case but it is. X has 500x the active users of Mastodon it will always outpreform. I dont think that means Firefox had to leave Mastodon but alas they need to promote their product first and foremost and they can do activism second and take the moral highroad third. If the product fails it all fails and we all end up on google chrome.

  • source
  • parent
  • context
  • [–] 3 points 1 day ago (2 children)

    Nothing new just a 50min talk about the project and how to use it. I tried it, it was easy to setup and was fast compared to other altnets. There wasnt much on it, a chat app, a few sites, mail, git the usual. Technically interesting and I will follow it but i dont see myself learning how to develop apps for it.

  • source
  • parent
  • context
  •  

    I'm really not sure how to feel about this one. On one hand its great that less dogs are being put down. On the other hand people who got their dog impounded and couldnt afford $93 are taking an after pay loan to get it back. As someone who used to live in south auckland I feel like this is going to make the roaming dog problem way worse. If you're getting your dog impounded and after paying $93 then you are probably not equipped to be owning a dog.

     

    I want to preface this by saying that I think I got cooked by AI here.

    I have a game where I am working on a job system. The job system has a job objects which I need to put into a data structure that can be searched via id, location, or work type. At first I was building with the mindset of "do whatever to solve this problem and make it work" but it became very hard to implement new features because I would break everything. So I started trying to think ahead and design ways of doing things that would handle all the different jobs and things.

    At first I put all jobs into an array and iterated through. Then I learned about dictionaries and started using them for way to many things and so i updated my job queue to be a dictionary with the Key as ID > JobObj

    Then I decided to plan out the job system before writing anything and "do it properly". I decided I needed to upgrade the data structure holding jobs because its a core part of the game and will be heavily interacted with. But I realized I only know array, dictionary and database, so I asked AI what data structure I should use and it suggested a nested dictionary.

    Now im using multiple dictionaries but im really hating it. Its hard for me to work with and conceptually im not sure I can visualize how its even working.

    How I am thinking about it is there is multiple layers of keys, 1st layer is work types, then once I find the work type it points to a dictionary of region IDs and that points to an array of jobs in the region.

    Job def is work type like Planting Region id: the map is broken down into region IDs so i dont have to check every tile and can limit seaching

    #python
    var job_pool: Dictionary = {}
    
    func register(designation: DesignationObj) -> void:
    	var job_def = designation.job
    	var region_id = designation.region_id
    	if not job_pool.has(job_def):
    		job_pool[job_def] = {} 
    	if not job_pool[job_def].has(region_id):
    		job_pool[job_def][region_id] = []
    	job_pool[job_def][region_id].append(designation)
    

    Here is how I am picturing it in my head.

    var job_pool {
    	"plants": {
    		"1": {
    			"job1"
    			"job2"
    		}
    		"2": {
    			"job3"
    		}
    	}
    	"mining": {
    		"1": {
    			"job4"
    			"job5"
    		}
    	}
    	"hunting": {
    		"5":{
    			"job12"
    		}
    	}
    }
    

    But now I want to add ID look up into this im stuck and im thinking the entire structure does not work for what it needs to do.

     

    I am working on the input and it feels like its getting out of hand. I wanted to check in with people and see how people structure their input handling.

    Currently I have 1 function _unhandled_unput(event) and inside there I have a ton of elif statements trying to handle every possible situation and event. Its manageable at the moment but I only have like 4 events so its going to get very out of hand if I continue.

    I need to have 100s of these events based on whats selected and what mouse/keyboard buttons are being pressed and I need some way to resuse the actions.

    spoiler

    func _unhandled_input(event):
    	if event is InputEventMouseButton and event.pressed:
    		if event.button_index == MOUSE_BUTTON_RIGHT:
    			clear_selection()
    			gui.queue_redraw()
    			get_viewport().set_input_as_handled()
    			return
    	if selected_item == "colonist": #broken
    		if event is InputEventKey:
    			if event.OS.get_keycode_string() == "r":
    				for colonist in selected_group:
    					colonist.set_state("DRAFT")
    					get_viewport().set_input_as_handled()
    					gui.queue_redraw()
    	#nothing selected dragbox to select things and single click to select things - does not work at the moment
    	elif selected_type == "" or selected_type == "basic":
    		if is_dragging and event is InputEventMouseMotion:
    				drag_end = camera.get_global_mouse_position()
    				cam_drag_end= get_viewport().get_mouse_position()
    				get_selection(drag_start, drag_end)
    				gui.queue_redraw()
    				get_viewport().set_input_as_handled()
    				return
    		elif event is InputEventMouseButton and not event.pressed:
    			is_dragging = false
    			gui.queue_redraw()
    			drag_start = null
    			drag_end = null
    			get_viewport().set_input_as_handled()
    			return
    		elif event is InputEventMouseButton and event.pressed:
    			if event.button_index == MOUSE_BUTTON_LEFT:
    				selected_type = "basic"
    				is_dragging = true
    				drag_start = camera.get_global_mouse_position()
    				cam_drag_start = get_viewport().get_mouse_position()
    				gui.queue_redraw()
    				get_viewport().set_input_as_handled()
    				return
    	#command flow for dragging a selection box
    	elif selected_type == "command":
    		if selected_item == "structure_dict_growing":
    			if is_dragging and event is InputEventMouseMotion:
    				var grid_pos = tilemap.local_to_map(camera.get_global_mouse_position())
    				var local_pos = tilemap.map_to_local(grid_pos)
    				drag_end = local_pos + Vector2(32, 32)
    				cam_drag_end = get_viewport().get_mouse_position()
    				gui.queue_redraw()
    				get_viewport().set_input_as_handled()
    				return
    			elif event is InputEventMouseButton and not event.pressed:
    				if event.button_index == MOUSE_BUTTON_LEFT:
    					is_dragging = false
    					gui.queue_redraw()
    					get_viewport().set_input_as_handled()
    					MessageBus.rpc_id(1, "request_zone_growing", selected_item ,drag_start, drag_end, multiplayer.get_unique_id())
    					drag_start = null
    					drag_end = null
    					return
    			elif event is InputEventMouseButton and event.pressed:
    				if event.button_index == MOUSE_BUTTON_LEFT:
    					is_dragging = true
    					#to snap to grid
    					var grid_pos = tilemap.local_to_map(camera.get_global_mouse_position())
    					var local_pos = tilemap.map_to_local(grid_pos)
    					drag_start = local_pos - Vector2(32, 32)
    					cam_drag_start = get_viewport().get_mouse_position() #this is broken cbf fixing maybe one day after selection is working 
    					gui.queue_redraw()
    					get_viewport().set_input_as_handled()
    					return
    	elif selected_type == "floor":
    		if event is InputEventMouseButton and event.pressed:
    			if event.button_index == MOUSE_BUTTON_LEFT:
    				var global_mouse_pos = camera.get_global_mouse_position()
    				var grid_pos = tilemap.local_to_map(global_mouse_pos)
    				if selected_item == "":
    					return
    				MessageBus.rpc_id(1, "request_build_floor", selected_item, grid_pos, multiplayer.get_unique_id())
    				get_viewport().set_input_as_handled()
    				return
    	elif selected_type == "building":
    		if event is InputEventMouseButton and event.pressed:
    			if event.button_index == MOUSE_BUTTON_LEFT:
    				var global_mouse_pos = camera.get_global_mouse_position()
    				var grid_pos = tilemap.local_to_map(global_mouse_pos)
    				if selected_item == "":
    					return
    				MessageBus.rpc_id(1, "request_build_structure", selected_item, grid_pos, multiplayer.get_unique_id())
    				get_viewport().set_input_as_handled()
    				return
    

    submitted 2 months ago* (last edited 2 months ago) by to c/godot@programming.dev
     

    Edit: ah i was reading an old doc because the reddit comment I saw was 6 years old. The property is get_property_list()

    I have a script that is a global it contains a bunch of dictionaries that describe items. I need a way to get a list of the different types.

    Searching for solutions I found https://docs.godotengine.org/en/3.2/classes/class_script.html#class-script-method-get-script-property-list

    but I cant seem to get it working. Godot says "Function "get_script_property_list()" not found in base self"

    Example of the what im trying to get a list of

    var tile_dict_grass = {
    	"name": "grass",
    	"source": 1,
    	"atlas": Vector2i(1,0),
    	"move_speed": 0.80,
    	"path_cost": 2,
    	"fertility": 1,
    	"cleanliness": 1.5,
    	"flammability": 0.60,
    	"build_categories": "all",
    	"solid": false
    }
    var tile_dict_rich_soil = {
    	"name": "rich soil",
    	"source": 1,
    	"atlas": Vector2i(1,0),
    	"move_speed": 0.80,
    	"path_cost": 2,
    	"fertility": 1.4,
    	"cleanliness": -1.0,
    	"flammability": 0.0,
    	"build_categories": "all",
    	"solid": false
    }
    

    How im trying to get it.

    func get_tile_dict():
    	var property_list = self.get_script_property_list()
    	var tile_list = []
    	for attr in dir(self):
    		if attr.startswith('tile_dict'):
    			value = getattr(self, attr)
    			tile_list.append(value)
    	return tile_list
    
    view more: next ›