mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 03:26:31 +01:00
Co-authored-by: tralezab <spamqetuo2@gmail.com> Co-authored-by: Mothblocks <35135081+Jared-Fogle@users.noreply.github.com> Co-authored-by: Aleksej Komarov <stylemistake@gmail.com> Co-authored-by: Qustinnus <Floydje123@hotmail.com> Co-authored-by: coiax <yellowbounder@gmail.com> Co-authored-by: AnturK <AnturK@users.noreply.github.com> Co-authored-by: tralezab <spamqetuo2@gmail.com> Co-authored-by: Mothblocks <35135081+Jared-Fogle@users.noreply.github.com> Co-authored-by: Aleksej Komarov <stylemistake@gmail.com> Co-authored-by: Qustinnus <Floydje123@hotmail.com> Co-authored-by: coiax <yellowbounder@gmail.com>
This commit is contained in:
@@ -516,3 +516,22 @@
|
||||
assets = list(
|
||||
"safe_dial.png" = 'html/safe_dial.png'
|
||||
)
|
||||
|
||||
/datum/asset/spritesheet/fish
|
||||
name = "fish"
|
||||
|
||||
/datum/asset/spritesheet/fish/register()
|
||||
for (var/path in subtypesof(/datum/aquarium_behaviour/fish))
|
||||
var/datum/aquarium_behaviour/fish/fish_type = path
|
||||
var/fish_icon = initial(fish_type.icon)
|
||||
var/fish_icon_state = initial(fish_type.icon_state)
|
||||
var/id = sanitize_css_class_name("[fish_icon][fish_icon_state]")
|
||||
if(sprites[id]) //no dupes
|
||||
continue
|
||||
Insert(id, fish_icon, fish_icon_state)
|
||||
..()
|
||||
|
||||
/// Removes all non-alphanumerics from the text, keep in mind this can lead to id conflicts
|
||||
/proc/sanitize_css_class_name(name)
|
||||
var/static/regex/regex = new(@"[^a-zA-Z0-9]","g")
|
||||
return replacetext(name, regex, "")
|
||||
|
||||
Reference in New Issue
Block a user