Files
Paradise/code/modules/buildmode/submodes/fill.dm
Crazylemon64 5b0eedcee5 Refactors buildmode into submodules, and adds an "atmos" buildmode
Also makes the mode selection interface far less tedious/painful

Adds unsimulated turf overriding, and admin logging

Temporary commit for storing the sdql buildmode

Adds extra documentation

also requires a path to be selected for "advanced" and "fill" modes, now

Spaces out mode switch buttons nicer

removes need for debug rights to do a fill with mob paths

Adds a bunch of extra fancy paths

Fox Changes pt 1

Backports /tg/station changes

Fixes a double-tap issue with dclick handling of certain mobs

Also no longer shows the "selection canceled" if you haven't selected a
region for the buildmode that supports region selection

Updates buildmode stuff
2018-10-07 20:54:40 -07:00

49 lines
1.7 KiB
Plaintext

/datum/buildmode_mode/fill
key = "fill"
use_corner_selection = TRUE
var/objholder = null
/datum/buildmode_mode/fill/show_help(mob/user)
to_chat(user, "<span class='notice'>***********************************************************</span>")
to_chat(user, "<span class='notice'>Left Mouse Button on turf/obj/mob = Select corner</span>")
to_chat(user, "<span class='notice'>Left Mouse Button + Alt on turf/obj/mob = Delete region</span>")
to_chat(user, "<span class='notice'>Right Mouse Button on buildmode button = Select object type</span>")
to_chat(user, "<span class='notice'>***********************************************************</span>")
/datum/buildmode_mode/fill/change_settings(mob/user)
var/target_path = input(user,"Enter typepath:" ,"Typepath","/obj/structure/closet")
objholder = text2path(target_path)
if(!ispath(objholder))
objholder = pick_closest_path(target_path)
if(!objholder)
alert("No path has been selected.")
return
else if(ispath(objholder, /area))
objholder = null
alert("Area paths are not supported for this mode, use the area edit mode instead.")
return
deselect_region()
/datum/buildmode_mode/fill/handle_click(mob/user, params, obj/object)
if(isnull(objholder))
to_chat(user, "<span class='warning'>Select an object type first.</span>")
deselect_region()
return
..()
/datum/buildmode_mode/fill/handle_selected_region(mob/user, params)
var/list/pa = params2list(params)
var/left_click = pa.Find("left")
var/alt_click = pa.Find("alt")
if(left_click) //rectangular
if(alt_click)
empty_region(block(cornerA,cornerB))
else
for(var/turf/T in block(cornerA,cornerB))
if(ispath(objholder,/turf))
T.ChangeTurf(objholder)
else
var/obj/A = new objholder(T)
A.setDir(BM.build_dir)