mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-27 10:33:21 +00:00
[MIRROR] up port those (#10758)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
b72b351fa6
commit
996143693f
@@ -69,7 +69,7 @@
|
|||||||
shadeColour = new_colour
|
shadeColour = new_colour
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/pen/crayon/afterattack(atom/target, mob/user, proximity, click_parameters) // CHOMPEdit - Click parameters
|
/obj/item/pen/crayon/afterattack(atom/target, mob/user, proximity, click_parameters)
|
||||||
if(!proximity) return
|
if(!proximity) return
|
||||||
if(istype(target,/turf/simulated/floor))
|
if(istype(target,/turf/simulated/floor))
|
||||||
var/drawtype = tgui_input_list(user, "Choose what you'd like to draw.", "Crayon scribbles", list("graffiti","rune","letter","arrow"))
|
var/drawtype = tgui_input_list(user, "Choose what you'd like to draw.", "Crayon scribbles", list("graffiti","rune","letter","arrow"))
|
||||||
@@ -99,8 +99,6 @@
|
|||||||
return
|
return
|
||||||
to_chat(user, "You start drawing an arrow on the [target.name].")
|
to_chat(user, "You start drawing an arrow on the [target.name].")
|
||||||
if(instant || do_after(user, 50))
|
if(instant || do_after(user, 50))
|
||||||
// CHOMPEdit Start - Better graffiti
|
|
||||||
//new /obj/effect/decal/cleanable/crayon(target,colour,shadeColour,drawtype)
|
|
||||||
var/list/mouse_control = params2list(click_parameters)
|
var/list/mouse_control = params2list(click_parameters)
|
||||||
var/p_x = 0
|
var/p_x = 0
|
||||||
var/p_y = 0
|
var/p_y = 0
|
||||||
@@ -111,7 +109,6 @@
|
|||||||
var/atom/new_graffiti = new /obj/effect/decal/cleanable/crayon(target,colour,shadeColour,drawtype)
|
var/atom/new_graffiti = new /obj/effect/decal/cleanable/crayon(target,colour,shadeColour,drawtype)
|
||||||
new_graffiti.pixel_x = p_x
|
new_graffiti.pixel_x = p_x
|
||||||
new_graffiti.pixel_y = p_y
|
new_graffiti.pixel_y = p_y
|
||||||
// CHOMPEdit End
|
|
||||||
to_chat(user, "You finish drawing.")
|
to_chat(user, "You finish drawing.")
|
||||||
|
|
||||||
var/msg = "[user.client.key] ([user]) has drawn [drawtype] (with [src]) at [target.x],[target.y],[target.z]."
|
var/msg = "[user.client.key] ([user]) has drawn [drawtype] (with [src]) at [target.x],[target.y],[target.z]."
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/turf/simulated/floor/attackby(var/obj/item/C, var/mob/user, attack_modifier, click_parameters) // CHOMPAdd - Attack_modifier, click_parameters
|
/turf/simulated/floor/attackby(var/obj/item/C, var/mob/user, attack_modifier, click_parameters)
|
||||||
|
|
||||||
if(!C || !user)
|
if(!C || !user)
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -134,14 +134,14 @@
|
|||||||
return success_smash(user)
|
return success_smash(user)
|
||||||
return fail_smash(user)
|
return fail_smash(user)
|
||||||
|
|
||||||
/turf/simulated/wall/attackby(var/obj/item/W, var/mob/user, attack_modifier, click_parameters) // CHOMPEdit - attack_modifier, click_parameters
|
/turf/simulated/wall/attackby(var/obj/item/W, var/mob/user, attack_modifier, click_parameters)
|
||||||
|
|
||||||
user.setClickCooldown(user.get_attack_speed(W))
|
user.setClickCooldown(user.get_attack_speed(W))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
//As with the floors, only this time it works AND tries pushing the wall after it's done.
|
//As with the floors, only this time it works AND tries pushing the wall after it's done.
|
||||||
if(!construction_stage && user.a_intent == I_HELP)
|
if(!construction_stage && user.a_intent == I_HELP)
|
||||||
if(try_graffiti(user,W, click_parameters)) // CHOMPEdit - Commented, but- Still. Just in case.
|
if(try_graffiti(user,W, click_parameters))
|
||||||
return
|
return
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -374,7 +374,7 @@
|
|||||||
/turf/proc/can_engrave()
|
/turf/proc/can_engrave()
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/turf/proc/try_graffiti(var/mob/vandal, var/obj/item/tool, click_parameters) // CHOMPEdt - click_parameters
|
/turf/proc/try_graffiti(var/mob/vandal, var/obj/item/tool, click_parameters)
|
||||||
|
|
||||||
if(!tool || !tool.sharp || !can_engrave()) //CHOMP Edit
|
if(!tool || !tool.sharp || !can_engrave()) //CHOMP Edit
|
||||||
return FALSE
|
return FALSE
|
||||||
@@ -407,7 +407,6 @@
|
|||||||
graffiti.message = message
|
graffiti.message = message
|
||||||
graffiti.author = vandal.ckey
|
graffiti.author = vandal.ckey
|
||||||
|
|
||||||
// CHOMPAdd - Cooler graffitis
|
|
||||||
if(click_parameters)
|
if(click_parameters)
|
||||||
var/list/mouse_control = params2list(click_parameters)
|
var/list/mouse_control = params2list(click_parameters)
|
||||||
var/p_x = 0
|
var/p_x = 0
|
||||||
@@ -419,7 +418,6 @@
|
|||||||
|
|
||||||
graffiti.pixel_x = p_x
|
graffiti.pixel_x = p_x
|
||||||
graffiti.pixel_y = p_y
|
graffiti.pixel_y = p_y
|
||||||
// CHOMPAdd End
|
|
||||||
|
|
||||||
if(lowertext(message) == "elbereth")
|
if(lowertext(message) == "elbereth")
|
||||||
to_chat(vandal, span_notice("You feel much safer."))
|
to_chat(vandal, span_notice("You feel much safer."))
|
||||||
|
|||||||
@@ -126,11 +126,10 @@
|
|||||||
. += "<tr><td colspan = 4><hr></td></tr>"
|
. += "<tr><td colspan = 4><hr></td></tr>"
|
||||||
|
|
||||||
for(var/thing in my_tracks)
|
for(var/thing in my_tracks)
|
||||||
// CHOMPAdd
|
|
||||||
var/data = GetAdminDataStringFor(thing, can_modify, user)
|
var/data = GetAdminDataStringFor(thing, can_modify, user)
|
||||||
if(!isnull(data))
|
if(!isnull(data))
|
||||||
. += "<tr>[GetAdminDataStringFor(thing, can_modify, user)]</tr>"
|
. += "<tr>[GetAdminDataStringFor(thing, can_modify, user)]</tr>"
|
||||||
// CHOMPAdd End
|
. += "<tr>[GetAdminDataStringFor(thing, can_modify, user)]</tr>"
|
||||||
. += "<tr><td colspan = 4><hr></td></tr>"
|
. += "<tr><td colspan = 4><hr></td></tr>"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,8 @@
|
|||||||
name = "filth"
|
name = "filth"
|
||||||
entries_expire_at = 4 // 4 rounds, 24 hours.
|
entries_expire_at = 4 // 4 rounds, 24 hours.
|
||||||
var/saves_dirt = TRUE //VOREStation edit
|
var/saves_dirt = TRUE //VOREStation edit
|
||||||
has_admin_data = TRUE // CHOMPEdit
|
has_admin_data = TRUE
|
||||||
|
|
||||||
// CHOMPAdd
|
|
||||||
/datum/persistent/filth/GetAdminDataStringFor(var/thing, var/can_modify, var/mob/user)
|
/datum/persistent/filth/GetAdminDataStringFor(var/thing, var/can_modify, var/mob/user)
|
||||||
if(istype(thing, /obj/effect/decal/cleanable/crayon))
|
if(istype(thing, /obj/effect/decal/cleanable/crayon))
|
||||||
var/obj/effect/decal/cleanable/crayon/CRAY = thing
|
var/obj/effect/decal/cleanable/crayon/CRAY = thing
|
||||||
@@ -12,7 +11,6 @@
|
|||||||
return "<td colspan = 3>[thing]</td><td>Loc:([CRAY.x],[CRAY.y],[CRAY.z]) P_X: [CRAY.pixel_x] P_Y: [CRAY.pixel_y] Color: [CRAY.art_color] Shading: [CRAY.art_shade] Type: [CRAY.art_type]</td><td><a href='byond://?src=\ref[src];caller=\ref[user];remove_entry=\ref[thing]'>Destroy</a></td>"
|
return "<td colspan = 3>[thing]</td><td>Loc:([CRAY.x],[CRAY.y],[CRAY.z]) P_X: [CRAY.pixel_x] P_Y: [CRAY.pixel_y] Color: [CRAY.art_color] Shading: [CRAY.art_shade] Type: [CRAY.art_type]</td><td><a href='byond://?src=\ref[src];caller=\ref[user];remove_entry=\ref[thing]'>Destroy</a></td>"
|
||||||
return "<td colspan = 4>[thing]</td>"
|
return "<td colspan = 4>[thing]</td>"
|
||||||
return null
|
return null
|
||||||
// CHOMPEnd
|
|
||||||
|
|
||||||
/datum/persistent/filth/IsValidEntry(var/atom/entry)
|
/datum/persistent/filth/IsValidEntry(var/atom/entry)
|
||||||
. = ..() && entry.invisibility == 0
|
. = ..() && entry.invisibility == 0
|
||||||
@@ -20,14 +18,12 @@
|
|||||||
/datum/persistent/filth/CheckTokenSanity(var/list/token)
|
/datum/persistent/filth/CheckTokenSanity(var/list/token)
|
||||||
// byond's json implementation is "questionable", and uses types as keys and values without quotes sometimes even though they aren't valid json
|
// byond's json implementation is "questionable", and uses types as keys and values without quotes sometimes even though they aren't valid json
|
||||||
token["path"] = istext(token["path"]) ? text2path(token["path"]) : token["path"]
|
token["path"] = istext(token["path"]) ? text2path(token["path"]) : token["path"]
|
||||||
// CHOMPAdd - Cooler graffiti
|
|
||||||
token["pixel_x"] = istext(token["pixel_x"]) ? text2num(token["pixel_x"]) : token["pixel_x"]
|
token["pixel_x"] = istext(token["pixel_x"]) ? text2num(token["pixel_x"]) : token["pixel_x"]
|
||||||
token["pixel_y"] = istext(token["pixel_y"]) ? text2num(token["pixel_y"]) : token["pixel_y"]
|
token["pixel_y"] = istext(token["pixel_y"]) ? text2num(token["pixel_y"]) : token["pixel_y"]
|
||||||
return ..() && ispath(token["path"]) && (!saves_dirt || isnum(token["dirt"])) && isnum(token["pixel_x"]) && isnum(token["pixel_y"])
|
return ..() && ispath(token["path"]) && (!saves_dirt || isnum(token["dirt"])) && isnum(token["pixel_x"]) && isnum(token["pixel_y"])
|
||||||
// CHOMPAdd End
|
|
||||||
/datum/persistent/filth/CheckTurfContents(var/turf/T, var/list/token)
|
/datum/persistent/filth/CheckTurfContents(var/turf/T, var/list/token)
|
||||||
var/_path = token["path"]
|
var/_path = token["path"]
|
||||||
// CHOMPEdit Start - Cooler graffitis
|
|
||||||
// return (locate(_path) in T) ? FALSE : TRUE
|
// return (locate(_path) in T) ? FALSE : TRUE
|
||||||
if(!ispath(_path, /obj/effect/decal/cleanable/crayon))
|
if(!ispath(_path, /obj/effect/decal/cleanable/crayon))
|
||||||
return (locate(_path) in T) ? FALSE : TRUE
|
return (locate(_path) in T) ? FALSE : TRUE
|
||||||
@@ -39,13 +35,11 @@
|
|||||||
if(too_much_crayon >= 5)
|
if(too_much_crayon >= 5)
|
||||||
return FALSE
|
return FALSE
|
||||||
return TRUE
|
return TRUE
|
||||||
// CHOMPEdit End
|
|
||||||
|
|
||||||
/datum/persistent/filth/CreateEntryInstance(var/turf/creating, var/list/token)
|
/datum/persistent/filth/CreateEntryInstance(var/turf/creating, var/list/token)
|
||||||
var/_path = token["path"]
|
var/_path = token["path"]
|
||||||
if (isspace(creating) || iswall(creating) ||isopenspace(creating))
|
if (isspace(creating) || iswall(creating) ||isopenspace(creating))
|
||||||
return
|
return
|
||||||
// CHOMPEdit Start
|
|
||||||
// new _path(creating, token["age"]+1)
|
// new _path(creating, token["age"]+1)
|
||||||
var/atom/inst
|
var/atom/inst
|
||||||
if(ispath(_path, /obj/effect/decal/cleanable/crayon))
|
if(ispath(_path, /obj/effect/decal/cleanable/crayon))
|
||||||
@@ -62,7 +56,6 @@
|
|||||||
inst.pixel_x = token["pixel_x"]
|
inst.pixel_x = token["pixel_x"]
|
||||||
if(token["pixel_y"])
|
if(token["pixel_y"])
|
||||||
inst.pixel_y = token["pixel_y"]
|
inst.pixel_y = token["pixel_y"]
|
||||||
// CHOMPEdit End
|
|
||||||
|
|
||||||
/datum/persistent/filth/GetEntryAge(var/atom/entry)
|
/datum/persistent/filth/GetEntryAge(var/atom/entry)
|
||||||
var/obj/effect/decal/cleanable/filth = entry
|
var/obj/effect/decal/cleanable/filth = entry
|
||||||
@@ -83,7 +76,6 @@
|
|||||||
LAZYADDASSOC(., "path", "[GetEntryPath(entry)]")
|
LAZYADDASSOC(., "path", "[GetEntryPath(entry)]")
|
||||||
if (saves_dirt)
|
if (saves_dirt)
|
||||||
LAZYADDASSOC(., "dirt", GetEntryDirt(entry))
|
LAZYADDASSOC(., "dirt", GetEntryDirt(entry))
|
||||||
// CHOMPAdd Start - Cooler graffiti
|
|
||||||
LAZYADDASSOC(., "pixel_x", "[entry.pixel_x]")
|
LAZYADDASSOC(., "pixel_x", "[entry.pixel_x]")
|
||||||
LAZYADDASSOC(., "pixel_y", "[entry.pixel_y]")
|
LAZYADDASSOC(., "pixel_y", "[entry.pixel_y]")
|
||||||
|
|
||||||
@@ -92,4 +84,3 @@
|
|||||||
LAZYADDASSOC(., "art_type", "[Inst.art_type]")
|
LAZYADDASSOC(., "art_type", "[Inst.art_type]")
|
||||||
LAZYADDASSOC(., "art_color", "[Inst.art_color]")
|
LAZYADDASSOC(., "art_color", "[Inst.art_color]")
|
||||||
LAZYADDASSOC(., "art_shade", "[Inst.art_shade]")
|
LAZYADDASSOC(., "art_shade", "[Inst.art_shade]")
|
||||||
// CHOMPAdd End
|
|
||||||
|
|||||||
@@ -3,12 +3,10 @@
|
|||||||
entries_expire_at = 4 // This previously was at 50 rounds??? Over 10 days.
|
entries_expire_at = 4 // This previously was at 50 rounds??? Over 10 days.
|
||||||
has_admin_data = TRUE
|
has_admin_data = TRUE
|
||||||
|
|
||||||
// CHOMPAdd Start
|
|
||||||
/datum/persistent/graffiti/CheckTokenSanity(var/list/token)
|
/datum/persistent/graffiti/CheckTokenSanity(var/list/token)
|
||||||
token["pixel_x"] = istext(token["pixel_x"]) ? text2num(token["pixel_x"]) : token["pixel_x"]
|
token["pixel_x"] = istext(token["pixel_x"]) ? text2num(token["pixel_x"]) : token["pixel_x"]
|
||||||
token["pixel_y"] = istext(token["pixel_y"]) ? text2num(token["pixel_y"]) : token["pixel_y"]
|
token["pixel_y"] = istext(token["pixel_y"]) ? text2num(token["pixel_y"]) : token["pixel_y"]
|
||||||
return ..() && isnum(token["pixel_x"]) && isnum(token["pixel_y"])
|
return ..() && isnum(token["pixel_x"]) && isnum(token["pixel_y"])
|
||||||
// CHOMPAdd End
|
|
||||||
|
|
||||||
/datum/persistent/graffiti/GetValidTurf(var/turf/T, var/list/token)
|
/datum/persistent/graffiti/GetValidTurf(var/turf/T, var/list/token)
|
||||||
var/turf/checking_turf = ..()
|
var/turf/checking_turf = ..()
|
||||||
@@ -27,12 +25,10 @@
|
|||||||
var/obj/effect/decal/writing/inst = new /obj/effect/decal/writing(creating, token["age"]+1, token["message"], token["author"])
|
var/obj/effect/decal/writing/inst = new /obj/effect/decal/writing(creating, token["age"]+1, token["message"], token["author"])
|
||||||
if(token["icon_state"])
|
if(token["icon_state"])
|
||||||
inst.icon_state = token["icon_state"]
|
inst.icon_state = token["icon_state"]
|
||||||
// CHOMPAdd Start
|
|
||||||
if(token["pixel_x"])
|
if(token["pixel_x"])
|
||||||
inst.pixel_x = token["pixel_x"]
|
inst.pixel_x = token["pixel_x"]
|
||||||
if(token["pixel_y"])
|
if(token["pixel_y"])
|
||||||
inst.pixel_y = token["pixel_y"]
|
inst.pixel_y = token["pixel_y"]
|
||||||
// CHOMPAdd End
|
|
||||||
|
|
||||||
/datum/persistent/graffiti/IsValidEntry(var/atom/entry)
|
/datum/persistent/graffiti/IsValidEntry(var/atom/entry)
|
||||||
. = ..()
|
. = ..()
|
||||||
@@ -50,8 +46,8 @@
|
|||||||
LAZYADDASSOC(., "author", "[save_graffiti.author ? save_graffiti.author : "unknown"]")
|
LAZYADDASSOC(., "author", "[save_graffiti.author ? save_graffiti.author : "unknown"]")
|
||||||
LAZYADDASSOC(., "message", "[save_graffiti.message]")
|
LAZYADDASSOC(., "message", "[save_graffiti.message]")
|
||||||
LAZYADDASSOC(., "icon_state", "[save_graffiti.icon_state]")
|
LAZYADDASSOC(., "icon_state", "[save_graffiti.icon_state]")
|
||||||
LAZYADDASSOC(., "pixel_x", "[save_graffiti.pixel_x]") // CHOMPAdd
|
LAZYADDASSOC(., "pixel_x", "[save_graffiti.pixel_x]")
|
||||||
LAZYADDASSOC(., "pixel_y", "[save_graffiti.pixel_y]") // CHOMPAdd
|
LAZYADDASSOC(., "pixel_y", "[save_graffiti.pixel_y]")
|
||||||
|
|
||||||
/datum/persistent/graffiti/GetAdminDataStringFor(var/thing, var/can_modify, var/mob/user)
|
/datum/persistent/graffiti/GetAdminDataStringFor(var/thing, var/can_modify, var/mob/user)
|
||||||
var/obj/effect/decal/writing/save_graffiti = thing
|
var/obj/effect/decal/writing/save_graffiti = thing
|
||||||
|
|||||||
@@ -1,15 +1,13 @@
|
|||||||
/datum/persistent/filth/trash
|
/datum/persistent/filth/trash
|
||||||
name = "trash"
|
name = "trash"
|
||||||
saves_dirt = FALSE //VOREStation edit
|
saves_dirt = FALSE
|
||||||
has_admin_data = FALSE // CHOMPEdit
|
has_admin_data = FALSE
|
||||||
|
|
||||||
/datum/persistent/filth/trash/CheckTurfContents(var/turf/T, var/list/tokens)
|
/datum/persistent/filth/trash/CheckTurfContents(var/turf/T, var/list/tokens)
|
||||||
var/too_much_trash = 0
|
var/too_much_trash = 0
|
||||||
for(var/obj/item/trash/trash in T)
|
for(var/obj/item/trash/trash in T)
|
||||||
//VOREStation Addition Start
|
|
||||||
if(istype(T, /obj/item/trash/spitwad) || istype(T, /obj/item/trash/spitgum))
|
if(istype(T, /obj/item/trash/spitwad) || istype(T, /obj/item/trash/spitgum))
|
||||||
return FALSE
|
return FALSE
|
||||||
//VOREStation Addition End
|
|
||||||
too_much_trash++
|
too_much_trash++
|
||||||
if(too_much_trash >= 5)
|
if(too_much_trash >= 5)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|||||||
Reference in New Issue
Block a user