mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 06:27:26 +01:00
Various fixes for bans and mutations.
This commit is contained in:
@@ -46,8 +46,8 @@
|
||||
|
||||
|
||||
|
||||
var/husk = (mutations & HUSK)
|
||||
//var/obese = (mutations & FAT)
|
||||
var/husk = (HUSK in mutations)
|
||||
//var/obese = (FAT in mutation)
|
||||
|
||||
stand_icon.Blend(new /icon('birdman.dmi', "chest_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('birdman.dmi', "chest_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
@@ -43,19 +43,19 @@
|
||||
|
||||
// lol
|
||||
var/fat = ""
|
||||
/*if (mutations & FAT)
|
||||
/*if (FAT in mutation)
|
||||
fat = "fat"*/
|
||||
/*
|
||||
if (mutations & HULK)
|
||||
if (HULK in mutations)
|
||||
overlays += image("icon" = 'genetics.dmi', "icon_state" = "hulk[fat][!lying ? "_s" : "_l"]")
|
||||
*/
|
||||
if (mutations & COLD_RESISTANCE)
|
||||
if (COLD_RESISTANCE in mutations)
|
||||
overlays += image("icon" = 'genetics.dmi', "icon_state" = "fire[fat][!lying ? "_s" : "_l"]")
|
||||
|
||||
if (mutations & TK)
|
||||
if (TK in mutations)
|
||||
overlays += image("icon" = 'genetics.dmi', "icon_state" = "telekinesishead[fat][!lying ? "_s" : "_l"]")
|
||||
|
||||
if (mutations & LASER)
|
||||
if (LASER in mutations)
|
||||
overlays += image("icon" = 'genetics.dmi', "icon_state" = "lasereyes[!lying ? "_s" : "_l"]")
|
||||
|
||||
if (mutantrace)
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
// Uniform
|
||||
if(w_uniform)
|
||||
/*if (mutations & FAT && !(w_uniform.flags & ONESIZEFITSALL))
|
||||
/*if ((FAT in mutations) && !(w_uniform.flags & ONESIZEFITSALL))
|
||||
src << "\red You burst out of the [w_uniform.name]!"
|
||||
var/obj/item/clothing/c = w_uniform
|
||||
u_equip(c)
|
||||
@@ -157,7 +157,7 @@
|
||||
var/t1 = w_uniform.color
|
||||
if (!t1)
|
||||
t1 = icon_state
|
||||
/*if (mutations & FAT)
|
||||
/*if (FAT in mutations)
|
||||
overlays += image("icon" = 'uniform_fat.dmi', "icon_state" = "[t1][!lying ? "_s" : "_l"]", "layer" = MOB_LAYER)
|
||||
else*/
|
||||
overlays += image("icon" = 'uniform.dmi', "icon_state" = text("[][]",t1, (!(lying) ? "_s" : "_l")), "layer" = MOB_LAYER)
|
||||
@@ -269,7 +269,7 @@
|
||||
|
||||
var/tail_shown = 1
|
||||
if (wear_suit)
|
||||
/*if (mutations & FAT && !(wear_suit.flags & ONESIZEFITSALL))
|
||||
/*if ((FAT in mutations) && !(wear_suit.flags & ONESIZEFITSALL))
|
||||
src << "\red You burst out of the [wear_suit.name]!"
|
||||
var/obj/item/clothing/c = wear_suit
|
||||
u_equip(c)
|
||||
@@ -463,8 +463,8 @@
|
||||
|
||||
|
||||
|
||||
var/husk = (mutations & HUSK)
|
||||
//var/obese = (mutations & FAT)
|
||||
var/husk = (HUSK in mutations)
|
||||
//var/obese = (FAT in mutations)
|
||||
|
||||
stand_icon.Blend(new /icon('tajaran.dmi', "chest_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('tajaran.dmi', "chest_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
|
||||
if ((user.mutations & CLUMSY) && prob(50))
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
user << "\red The rod slips out of your hand and hits your head."
|
||||
user.take_organ_damage(10)
|
||||
user.Paralyse(20)
|
||||
|
||||
@@ -17,6 +17,8 @@ Starting up. [time2text(world.timeofday, "hh:mm.ss")]
|
||||
---------------------
|
||||
"}
|
||||
|
||||
href_logfile = file("data/logs/[time2text(world.realtime, "YYYY/MM-Month/DD-Day")] hrefs.html")
|
||||
|
||||
jobban_loadbanfile()
|
||||
jobban_updatelegacybans()
|
||||
LoadBans()
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
if (traitor_mob.mind)
|
||||
if (traitor_mob.mind.assigned_role == "Clown")
|
||||
traitor_mob << "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself."
|
||||
traitor_mob.mutations &= ~CLUMSY
|
||||
traitor_mob.mutations.Remove(CLUMSY)
|
||||
|
||||
// find a radio! toolbox(es), backpack, belt, headset, pockets
|
||||
var/loc = ""
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
//equip_if_possible(obj/item/W, slot, del_on_fail = 1)
|
||||
/*
|
||||
if(istype(user, /mob/living/carbon))
|
||||
if(user:mutations & TK && get_dist(source, user) <= 7)
|
||||
if((TK in user:mutations) && get_dist(source, user) <= 7)
|
||||
if(user:equipped()) return 0
|
||||
var/X = source:x
|
||||
var/Y = source:y
|
||||
|
||||
@@ -96,7 +96,7 @@ NOTEBOOK
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if ((usr.mutations & CLUMSY) && prob(50))
|
||||
if ((CLUMSY in usr.mutations) && prob(50))
|
||||
usr << text("\red You cut yourself on the paper.")
|
||||
return
|
||||
var/n_name = input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//Blocks an attempt to connect before even creating our client datum thing.
|
||||
world/IsBanned(key,address,computer_id)
|
||||
if(ckey(key) in admins)
|
||||
return ..()
|
||||
// if(ckey(key) in admins)
|
||||
// return ..()
|
||||
|
||||
//Guest Checking
|
||||
if( !guests_allowed && IsGuestKey(key) )
|
||||
if(IsGuestKey(key))
|
||||
log_access("Failed Login: [key] - Guests not allowed")
|
||||
message_admins("\blue Failed Login: [key] - Guests not allowed")
|
||||
return list("reason"="guest", "desc"="\nReason: Guests not allowed.brb")
|
||||
|
||||
@@ -2,9 +2,7 @@ var/CMinutes = null
|
||||
var/savefile/Banlist
|
||||
|
||||
|
||||
|
||||
/proc/CheckBan(var/ckey, var/id, var/address)
|
||||
|
||||
if(!Banlist) // if Banlist cannot be located for some reason
|
||||
LoadBans() // try to load the bans
|
||||
if(!Banlist) // uh oh, can't find bans!
|
||||
@@ -18,11 +16,11 @@ var/savefile/Banlist
|
||||
if( "[ckey][id]" in Banlist.dir )
|
||||
Banlist.cd = "[ckey][id]"
|
||||
if (Banlist["temp"])
|
||||
if (!GetBanExp(Banlist["minutes"]))
|
||||
if (!GetExp(Banlist["minutes"]))
|
||||
ClearTempbans()
|
||||
return 0
|
||||
else
|
||||
.["desc"] = "\nReason: [Banlist["reason"]]\nExpires: [GetBanExp(Banlist["minutes"])]\nBy: [Banlist["bannedby"]][appeal]"
|
||||
.["desc"] = "\nReason: [Banlist["reason"]]\nExpires: [GetExp(Banlist["minutes"])]\nBy: [Banlist["bannedby"]][appeal]"
|
||||
else
|
||||
Banlist.cd = "/base/[ckey][id]"
|
||||
.["desc"] = "\nReason: [Banlist["reason"]]\nExpires: <B>PERMENANT</B>\nBy: [Banlist["bannedby"]][appeal]"
|
||||
@@ -34,7 +32,7 @@ var/savefile/Banlist
|
||||
var/matches
|
||||
if( ckey == Banlist["key"] )
|
||||
matches += "ckey"
|
||||
if( id == Banlist["id"] && Banlist["skipIdCheck"] == 0)
|
||||
if( id == Banlist["id"] )
|
||||
if(matches)
|
||||
matches += "/"
|
||||
matches += "id"
|
||||
@@ -45,11 +43,11 @@ var/savefile/Banlist
|
||||
|
||||
if(matches)
|
||||
if(Banlist["temp"])
|
||||
if (!GetBanExp(Banlist["minutes"]))
|
||||
if (!GetExp(Banlist["minutes"]))
|
||||
ClearTempbans()
|
||||
return 0
|
||||
else
|
||||
.["desc"] = "\nReason: [Banlist["reason"]]\nExpires: [GetBanExp(Banlist["minutes"])]\nBy: [Banlist["bannedby"]][appeal]"
|
||||
.["desc"] = "\nReason: [Banlist["reason"]]\nExpires: [GetExp(Banlist["minutes"])]\nBy: [Banlist["bannedby"]][appeal]"
|
||||
else
|
||||
.["desc"] = "\nReason: [Banlist["reason"]]\nExpires: <B>PERMENANT</B>\nBy: [Banlist["bannedby"]][appeal]"
|
||||
.["reason"] = matches
|
||||
@@ -63,16 +61,15 @@ var/savefile/Banlist
|
||||
/proc/LoadBans()
|
||||
|
||||
Banlist = new("data/banlist.bdb")
|
||||
log_admin("Loading Banlist")
|
||||
log_admin("Loading banlist.")
|
||||
|
||||
if (!length(Banlist.dir)) log_admin("Banlist is empty.")
|
||||
|
||||
if (!Banlist.dir.Find("base"))
|
||||
log_admin("Banlist missing base dir.")
|
||||
Banlist.dir.Add("base")
|
||||
Banlist.cd = "/base"
|
||||
else if (Banlist.dir.Find("base"))
|
||||
Banlist.cd = "/base"
|
||||
|
||||
Banlist.cd = "/base"
|
||||
|
||||
ClearTempbans()
|
||||
return 1
|
||||
@@ -112,7 +109,6 @@ var/savefile/Banlist
|
||||
Banlist.cd = "/base/[ckey][computerid]"
|
||||
Banlist["key"] << ckey
|
||||
Banlist["id"] << computerid
|
||||
Banlist["skipIdCheck"] << 0
|
||||
Banlist["reason"] << reason
|
||||
Banlist["bannedby"] << bannedby
|
||||
Banlist["temp"] << temp
|
||||
@@ -149,7 +145,7 @@ var/savefile/Banlist
|
||||
|
||||
return 1
|
||||
|
||||
/proc/GetBanExp(minutes as num)
|
||||
/proc/GetExp(minutes as num)
|
||||
UpdateTime()
|
||||
var/exp = minutes - CMinutes
|
||||
if (exp <= 0)
|
||||
@@ -172,7 +168,7 @@ var/savefile/Banlist
|
||||
for (var/A in Banlist.dir)
|
||||
count++
|
||||
Banlist.cd = "/base/[A]"
|
||||
dat += text("<tr><td><A href='?src=\ref[src];unban_del=[Banlist["key"]][Banlist["id"]]'>(U)</A><A href='?src=\ref[src];unban_edit=[Banlist["key"]][Banlist["id"]]'>(E)</A><A href='?src=\ref[src];unban_cid=[Banlist["key"]][Banlist["id"]]'>(K)</A> Key: <B>[Banlist["key"]]</B></td><td> ([Banlist["temp"] ? "[GetBanExp(Banlist["minutes"]) ? GetBanExp(Banlist["minutes"]) : "Removal pending" ]" : "Permaban"])</td><td>(By: [Banlist["bannedby"]])</td><td>(Reason: [Banlist["reason"]])</td></tr>")
|
||||
dat += text("<tr><td><A href='?src=\ref[src];unban_del=[Banlist["key"]][Banlist["id"]]'>(U)</A><A href='?src=\ref[src];unban_edit=[Banlist["key"]][Banlist["id"]]'>(E)</A><A href='?src=\ref[src];unban_cid=[Banlist["key"]][Banlist["id"]]'>(K)</A> Key: <B>[Banlist["key"]]</B></td><td> ([Banlist["temp"] ? "[GetExp(Banlist["minutes"]) ? GetExp(Banlist["minutes"]) : "Removal pending" ]" : "Permaban"])</td><td>(By: [Banlist["bannedby"]])</td><td>(Reason: [Banlist["reason"]])</td></tr>")
|
||||
|
||||
dat += "</table>"
|
||||
dat = "<HR><B>Bans:</B> <FONT COLOR=blue>(U) = Unban , (E) = Edit Ban , (K) = Remove Computer ID</FONT> - <FONT COLOR=green>([count] Bans)</FONT><HR><table border=1 rules=all frame=void cellspacing=0 cellpadding=3 >[dat]"
|
||||
|
||||
@@ -282,10 +282,10 @@ var/global/BSACooldown = 0
|
||||
if(!reason)
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetBanExp(mins + CMinutes)]")
|
||||
log_admin("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetExp(mins + CMinutes)]")
|
||||
|
||||
ban_unban_log_save("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetBanExp(mins + CMinutes)]")
|
||||
message_admins("\blue [key_name_admin(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetBanExp(mins + CMinutes)]", 1)
|
||||
ban_unban_log_save("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetExp(mins + CMinutes)]")
|
||||
message_admins("\blue [key_name_admin(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetExp(mins + CMinutes)]", 1)
|
||||
Banlist.cd = "/base/[banfolder]"
|
||||
Banlist["reason"] << reason
|
||||
Banlist["temp"] << temp
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
mind.key = key
|
||||
mind.current = src
|
||||
|
||||
spawn() Playmusic() // git some tunes up in heeyaa~
|
||||
|
||||
var/starting_loc = pick(newplayer_start)
|
||||
if(!starting_loc) starting_loc = locate(1,1,1)
|
||||
loc = starting_loc
|
||||
@@ -28,7 +26,7 @@
|
||||
if(watch_locations.len>0)
|
||||
loc = pick(watch_locations)
|
||||
|
||||
if(!preferences.savefile_load(src, 0))
|
||||
if(!preferences.savefile_load(src, 1))
|
||||
preferences.ShowChoices(src)
|
||||
if(!client.changes)
|
||||
changes()
|
||||
@@ -37,11 +35,16 @@
|
||||
if(!client.changes && preferences.lastchangelog!=lastchangelog)
|
||||
changes()
|
||||
preferences.lastchangelog = lastchangelog
|
||||
preferences.savefile_save(src)
|
||||
preferences.savefile_save(src, 1)
|
||||
|
||||
if(preferences.pregame_music)
|
||||
spawn() Playmusic() // git some tunes up in heeyaa~
|
||||
|
||||
if(client.has_news())
|
||||
src << "<b><font color=blue>There are some unread <a href='?src=\ref[news_topic_handler];client=\ref[client];action=show_news'>news</a> for you! Please make sure to read all news, as they may contain important updates about roleplay rules or canon.</font></b>"
|
||||
|
||||
new_player_panel()
|
||||
|
||||
spawn(10)
|
||||
if(client)
|
||||
new_player_panel()
|
||||
//PDA Resource Initialisation =======================================================>
|
||||
/*
|
||||
Quick note: local dream daemon instances don't seem to cache images right. Might be
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
continue
|
||||
M.show_message("[user.name] smashed the light!", 3, "You hear a tinkle of breaking glass", 2)
|
||||
if(on && (W.flags & CONDUCT))
|
||||
//if(!user.mutations & COLD_RESISTANCE)
|
||||
//if(!(COLD_RESISTANCE in user.mutations))
|
||||
if (prob(12))
|
||||
electrocute_mob(user, get_area(src), src, 0.3)
|
||||
broken()
|
||||
@@ -245,7 +245,7 @@
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
//if(!user.mutations & COLD_RESISTANCE)
|
||||
//if(!(COLD_RESISTANCE in user.mutations))
|
||||
if (prob(75))
|
||||
electrocute_mob(user, get_area(src), src, rand(0.7,1.0))
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
src.now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
/*if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
|
||||
/*if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
|
||||
if(prob(20))
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if(M.client)
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
handle_regular_hud_updates()
|
||||
|
||||
if (src.stat == 2 || src.mutations & XRAY)
|
||||
if (src.stat == 2 || XRAY in src.mutations)
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.sight |= SEE_OBJS
|
||||
|
||||
Reference in New Issue
Block a user