Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upFix/window disassembly fail #6110
Conversation
terribleperson
added some commits
Feb 14, 2014
KA101
reviewed
Feb 15, 2014
| if (g->m.has_furn(p.x, p.y)) { | ||
| std::string furn_here = g->m.get_furn(p.x, p.y); | ||
| g->add_msg(_("You disassemble the %s."), g->m.furnname(p.x, p.y).c_str()); | ||
| if(furn_here == "f_makeshift_bed" || furn_here == "" || furn_here == "f_beg" || furn_here == "f_armchair" || furn_here == "f_sofa") { |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Looks good otherwise. Fix and I'll pull for testing. |
KA101
reviewed
Feb 15, 2014
| } else if(ter_here == "t_blackboard") { | ||
| g->m.spawn_item(p.x, p.y, "2x4", 4); | ||
| g->m.spawn_item(p.x, p.y, "nail", 0, rng(6,10)); | ||
| g->m.ter_set(p.x, p.y, t_pavement); |
This comment has been minimized.
This comment has been minimized.
KA101
Feb 15, 2014
Contributor
Oddly enough, the backboard is now immune to disassembly. Same symptoms as the windows.
KA101
reviewed
Feb 15, 2014
| } else if(ter_here == "t_rdoor_c" || ter_here == "t_rdoor_o") { | ||
| g->m.spawn_item(p.x, p.y, "2x4", 24); | ||
| g->m.spawn_item(p.x, p.y, "nail", 0, rng(36,48)); | ||
| g->m.ter_set(p.x, p.y, t_door_c); |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Feb 15, 2014
| g->m.spawn_item(p.x, p.y, "cable", rng(1,15)); | ||
| g->m.spawn_item(p.x, p.y, "cu_pipe", rng(2,5)); | ||
| g->m.furn_set(p.x, p.y, f_null); | ||
| } else if(furn_here == "f_dryer") { |
This comment has been minimized.
This comment has been minimized.
KA101
Feb 15, 2014
Contributor
Dryers ain't happening either, though they (like doors) simply refuse disassembly, whereas the backboard takes time & says it's disassembled but nothing happens.
KA101
reviewed
Feb 15, 2014
| g->m.spawn_item(p.x, p.y, "element", rng(1,4)); | ||
| g->m.spawn_item(p.x, p.y, "pilot_light", 1); | ||
| g->m.furn_set(p.x, p.y, f_null); | ||
| } else if(furn_here == "f_fridge") { |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Feb 15, 2014
| g->m.spawn_item(p.x, p.y, "cable", rng(1,15)); | ||
| g->m.spawn_item(p.x, p.y, "element", rng(1,3)); | ||
| g->m.furn_set(p.x, p.y, f_null); | ||
| } else if(furn_here == "f_exercise") { |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Not being able to take down doors, dryers, washers, or anything else that simply refuses disassembly is expected behaviour. They lack the DECONSTRUCT flag, and this fix simply attempts to return behaviour to where it was prior to Rivet's additions. I'm working on moving disassembly data to the jsons, but that'll be a different PR. The backboard, though... apparently I had it as 'blackboard'. That should be fixed now. Does anything else have the same behavior as the windows or backboard? |
This comment has been minimized.
This comment has been minimized.
|
OK, so we give doors the DECONSTRUCT flag as they're trivial to dismount given a hammer and screwdriver. I can do it IRL and I claim at most 1 point in Construction. (Knock out the hinge pins, take the door out of the hinges, remove hinges & optionally latch-receptor, BAM deconstructed.) |
This comment has been minimized.
This comment has been minimized.
|
Since it was that way once upon a time, fair enough. Done. |
KA101
self-assigned this
Feb 16, 2014
kevingranade
reviewed
Feb 16, 2014
| if (g->m.has_furn(p.x, p.y)) { | ||
| std::string furn_here = g->m.get_furn(p.x, p.y); | ||
| g->add_msg(_("You disassemble the %s."), g->m.furnname(p.x, p.y).c_str()); | ||
| if(furn_here == "f_makeshift_bed" || furn_here == "" || furn_here == "f_bed" || furn_here == "f_armchair" || furn_here == "f_sofa") { |
terribleperson commentedFeb 15, 2014
This should fix the bug where disassembly of certain furniture and terrain does not work.