mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Merge pull request #2291 from Markolie/movefix
Fixes and pinpointer update
This commit is contained in:
@@ -56,10 +56,11 @@ var/global/nologevent = 0
|
||||
body += "[admin_jump_link(M, src)]\] </b><br>"
|
||||
|
||||
body += "<b>Mob type:</b> [M.type]<br>"
|
||||
if(M.client.related_accounts_cid.len)
|
||||
body += "<b>Related accounts by CID:</b> [list2text(M.client.related_accounts_cid, " - ")]<br>"
|
||||
if(M.client.related_accounts_ip.len)
|
||||
body += "<b>Related accounts by IP:</b> [list2text(M.client.related_accounts_ip, " - ")]<br><br>"
|
||||
if(M.client)
|
||||
if(M.client.related_accounts_cid.len)
|
||||
body += "<b>Related accounts by CID:</b> [list2text(M.client.related_accounts_cid, " - ")]<br>"
|
||||
if(M.client.related_accounts_ip.len)
|
||||
body += "<b>Related accounts by IP:</b> [list2text(M.client.related_accounts_ip, " - ")]<br><br>"
|
||||
|
||||
body += "<A href='?_src_=holder;boot2=\ref[M]'>Kick</A> | "
|
||||
body += "<A href='?_src_=holder;warn=[M.ckey]'>Warn</A> | "
|
||||
|
||||
@@ -40,13 +40,13 @@
|
||||
var/choice_amount = 0
|
||||
switch(polltype)
|
||||
if("Single Option")
|
||||
polltype = "OPTION"
|
||||
polltype = POLLTYPE_OPTION
|
||||
if("Text Reply")
|
||||
polltype = "TEXT"
|
||||
polltype = POLLTYPE_TEXT
|
||||
if("Rating")
|
||||
polltype = "NUMVAL"
|
||||
polltype = POLLTYPE_RATING
|
||||
if("Multiple Choice")
|
||||
polltype = "MULTICHOICE"
|
||||
polltype = POLLTYPE_MULTI
|
||||
choice_amount = input("How many choices should be allowed?","Select choice amount") as num|null
|
||||
if(!choice_amount)
|
||||
return
|
||||
@@ -93,7 +93,7 @@
|
||||
var/err = query_polladd_question.ErrorMsg()
|
||||
log_game("SQL ERROR adding new poll question to table. Error : \[[err]\]\n")
|
||||
return
|
||||
if(polltype == "TEXT")
|
||||
if(polltype == POLLTYPE_TEXT)
|
||||
log_admin("[key_name(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"] - Question: [question]")
|
||||
message_admins("[key_name_admin(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"]<br>Question: [question]")
|
||||
return
|
||||
@@ -107,7 +107,7 @@
|
||||
pollid = query_get_id.item[1]
|
||||
var/add_option = 1
|
||||
while(add_option)
|
||||
var/option = input("Write your option","Option") as message|null
|
||||
var/option = input("Write your option",POLLTYPE_OPTION) as message|null
|
||||
if(!option)
|
||||
return pollid
|
||||
option = sanitizeSQL(option)
|
||||
@@ -124,7 +124,7 @@
|
||||
var/descmin = ""
|
||||
var/descmid = ""
|
||||
var/descmax = ""
|
||||
if(polltype == "NUMVAL")
|
||||
if(polltype == POLLTYPE_RATING)
|
||||
minval = input("Set minimum rating value.","Minimum rating") as num|null
|
||||
if(!minval)
|
||||
return pollid
|
||||
|
||||
@@ -361,11 +361,6 @@ var/const/POS_HEADER = {"<html>
|
||||
else
|
||||
overlays += "pos-standby"
|
||||
|
||||
/obj/machinery/pos/attack_robot(var/mob/user)
|
||||
// if(isMoMMI(user))
|
||||
// return attack_hand(user)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/pos/attack_hand(var/mob/user)
|
||||
user.set_machine(src)
|
||||
var/logindata=""
|
||||
|
||||
@@ -25,16 +25,15 @@
|
||||
spawn(600)
|
||||
if(ghost_volunteers.len)
|
||||
var/mob/dead/observer/O = pick(ghost_volunteers)
|
||||
if(istype(O) && O.client && O.key)
|
||||
if(check_observer(O))
|
||||
transfer_personality(O)
|
||||
reset_search()
|
||||
|
||||
/obj/item/device/mmi/posibrain/proc/request_player()
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
if(O.client && O.client.prefs.be_special & BE_PAI && !jobban_isbanned(O, "Cyborg") && !jobban_isbanned(O,"nonhumandept"))
|
||||
if(check_observer(O))
|
||||
O << "\blue <b>\A [src] has been activated. (<a href='?src=\ref[O];jump=\ref[src]'>Teleport</a> | <a href='?src=\ref[src];signup=\ref[O]'>Sign Up</a>)"
|
||||
//question(O.client)
|
||||
if(check_observer(O))
|
||||
O << "\blue <b>\A [src] has been activated. (<a href='?src=\ref[O];jump=\ref[src]'>Teleport</a> | <a href='?src=\ref[src];signup=\ref[O]'>Sign Up</a>)"
|
||||
//question(O.client)
|
||||
|
||||
/obj/item/device/mmi/posibrain/proc/check_observer(var/mob/dead/observer/O)
|
||||
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
|
||||
|
||||
@@ -284,9 +284,9 @@
|
||||
src << "<br><b>You are a maintenance drone, a tiny-brained robotic repair machine</b>."
|
||||
src << "You have no individual will, no personality, and no drives or urges other than your laws."
|
||||
src << "Use <b>;</b> to talk to other drones, and <b>say</b> to speak silently to your nearby fellows."
|
||||
src << "Remember, you are <b>lawed against interference with the crew</b>. Also remember, <b>you DO NOT take orders from the AI.</b>"
|
||||
src << "Remember, you are <b>lawed against interference with the crew</b>. Also remember, <b>you DO NOT take orders from the AI.</b>"
|
||||
src << "<b>Don't invade their worksites, don't steal their resources, don't tell them about the changeling in the toilets.</b>"
|
||||
src << "<b>If a crewmember has noticed you, <i>you are probably breaking your first law</i></b>."
|
||||
src << "<b>Make sure crew members do not notice you.</b>."
|
||||
|
||||
/*
|
||||
sprite["Default"] = "repairbot"
|
||||
|
||||
@@ -279,6 +279,7 @@
|
||||
if(src.emag)
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/cans/beer/B = src.emag
|
||||
B.reagents.add_reagent("beer2", 2)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/robot_module/butler/add_languages(var/mob/living/silicon/robot/R)
|
||||
//full set of languages
|
||||
|
||||
@@ -1270,8 +1270,6 @@ mob/proc/yank_out_object()
|
||||
NPC.key = key
|
||||
spawn(5)
|
||||
respawnable_list += usr
|
||||
else
|
||||
// message_admins("Failed to check type")
|
||||
else
|
||||
usr << "You are not dead or you have given up your right to be respawned!"
|
||||
return
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
switch(polltype)
|
||||
//Polls that have enumerated options
|
||||
if("OPTION")
|
||||
if(POLLTYPE_OPTION)
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
voted_query.Execute()
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
src << browse(output,"window=playerpoll;size=500x250")
|
||||
|
||||
//Polls with a text input
|
||||
if("TEXT")
|
||||
if(POLLTYPE_TEXT)
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT replytext FROM [format_table_name("poll_textreply")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
voted_query.Execute()
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
src << browse(output,"window=playerpoll;size=500x500")
|
||||
|
||||
//Polls with a text input
|
||||
if("NUMVAL")
|
||||
if(POLLTYPE_RATING)
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT o.text, v.rating FROM [format_table_name("poll_option")] o, erro_poll_vote v WHERE o.pollid = [pollid] AND v.ckey = '[usr.ckey]' AND o.id = v.optionid")
|
||||
voted_query.Execute()
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
output += "</form>"
|
||||
|
||||
src << browse(output,"window=playerpoll;size=500x500")
|
||||
if("MULTICHOICE")
|
||||
if(POLLTYPE_MULTI)
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
voted_query.Execute()
|
||||
|
||||
@@ -308,7 +308,7 @@
|
||||
var/multiplechoiceoptions = 0
|
||||
|
||||
while(select_query.NextRow())
|
||||
if(select_query.item[4] != "OPTION" && select_query.item[4] != "MULTICHOICE")
|
||||
if(select_query.item[4] != POLLTYPE_OPTION && select_query.item[4] != POLLTYPE_MULTI)
|
||||
return
|
||||
validpoll = 1
|
||||
if(select_query.item[5])
|
||||
@@ -377,7 +377,7 @@
|
||||
var/validpoll = 0
|
||||
|
||||
while(select_query.NextRow())
|
||||
if(select_query.item[4] != "TEXT")
|
||||
if(select_query.item[4] != POLLTYPE_TEXT)
|
||||
return
|
||||
validpoll = 1
|
||||
break
|
||||
@@ -435,7 +435,7 @@
|
||||
var/validpoll = 0
|
||||
|
||||
while(select_query.NextRow())
|
||||
if(select_query.item[4] != "NUMVAL")
|
||||
if(select_query.item[4] != POLLTYPE_RATING)
|
||||
return
|
||||
validpoll = 1
|
||||
break
|
||||
|
||||
@@ -278,10 +278,6 @@
|
||||
var/list/mobtypes = typesof(/mob/living/simple_animal)
|
||||
var/mobpath = input("Which type of mob should [src] turn into?", "Choose a type") in mobtypes
|
||||
|
||||
if(!safe_animal(mobpath))
|
||||
usr << "\red Sorry but this mob type is currently unavailable."
|
||||
return
|
||||
|
||||
if(notransform)
|
||||
return
|
||||
for(var/obj/item/W in src)
|
||||
@@ -313,10 +309,6 @@
|
||||
var/list/mobtypes = typesof(/mob/living/simple_animal)
|
||||
var/mobpath = input("Which type of mob should [src] turn into?", "Choose a type") in mobtypes
|
||||
|
||||
if(!safe_animal(mobpath))
|
||||
usr << "\red Sorry but this mob type is currently unavailable."
|
||||
return
|
||||
|
||||
var/mob/new_mob = new mobpath(src.loc)
|
||||
|
||||
new_mob.key = key
|
||||
@@ -326,72 +318,10 @@
|
||||
|
||||
qdel(src)
|
||||
|
||||
/* Certain mob types have problems and should not be allowed to be controlled by players.
|
||||
*
|
||||
* This proc is here to force coders to manually place their mob in this list, hopefully tested.
|
||||
* This also gives a place to explain -why- players shouldnt be turn into certain mobs and hopefully someone can fix them.
|
||||
*/
|
||||
/mob/proc/safe_animal(var/MP)
|
||||
|
||||
//Bad mobs! - Remember to add a comment explaining what's wrong with the mob
|
||||
if(!MP)
|
||||
return 0 //Sanity, this should never happen.
|
||||
|
||||
if(ispath(MP, /mob/living/simple_animal/hostile/spaceWorm))
|
||||
return 0 //Unfinished. Very buggy, they seem to just spawn additional space worms everywhere and eating your own tail results in new worms spawning.
|
||||
|
||||
if(ispath(MP, /mob/living/simple_animal/construct/behemoth))
|
||||
return 0 //I think this may have been an unfinished WiP or something. These constructs should really have their own class simple_animal/construct/subtype
|
||||
|
||||
if(ispath(MP, /mob/living/simple_animal/construct/armoured))
|
||||
return 0 //Verbs do not appear for players. These constructs should really have their own class simple_animal/construct/subtype
|
||||
|
||||
if(ispath(MP, /mob/living/simple_animal/construct/wraith))
|
||||
return 0 //Verbs do not appear for players. These constructs should really have their own class simple_animal/construct/subtype
|
||||
|
||||
if(ispath(MP, /mob/living/simple_animal/construct/builder))
|
||||
return 0 //Verbs do not appear for players. These constructs should really have their own class simple_animal/construct/subtype
|
||||
|
||||
//Good mobs!
|
||||
if(ispath(MP, /mob/living/simple_animal/pet/cat))
|
||||
return 1
|
||||
if(ispath(MP, /mob/living/simple_animal/pet/corgi))
|
||||
return 1
|
||||
if(ispath(MP, /mob/living/simple_animal/crab))
|
||||
return 1
|
||||
if(ispath(MP, /mob/living/simple_animal/hostile/carp))
|
||||
return 1
|
||||
if(ispath(MP, /mob/living/simple_animal/hostile/mushroom))
|
||||
return 1
|
||||
if(ispath(MP, /mob/living/simple_animal/shade))
|
||||
return 1
|
||||
if(ispath(MP, /mob/living/simple_animal/tomato))
|
||||
return 1
|
||||
if(ispath(MP, /mob/living/simple_animal/mouse))
|
||||
return 1 //It is impossible to pull up the player panel for mice (Fixed! - Nodrak)
|
||||
if(ispath(MP, /mob/living/simple_animal/hostile/bear))
|
||||
return 1 //Bears will auto-attack mobs, even if they're player controlled (Fixed! - Nodrak)
|
||||
if(ispath(MP, /mob/living/simple_animal/parrot))
|
||||
return 1 //Parrots are no longer unfinished! -Nodrak
|
||||
if(ispath(MP, /mob/living/simple_animal/pony))
|
||||
return 1 // ZOMG PONIES WHEEE
|
||||
if(ispath(MP, /mob/living/simple_animal/pet/fox))
|
||||
return 1
|
||||
if(ispath(MP, /mob/living/simple_animal/chick))
|
||||
return 1
|
||||
if(ispath(MP, /mob/living/simple_animal/pet/pug))
|
||||
return 1
|
||||
if(ispath(MP, /mob/living/simple_animal/butterfly))
|
||||
return 1
|
||||
//Not in here? Must be untested!
|
||||
return 0
|
||||
|
||||
|
||||
/mob/proc/safe_respawn(var/MP)
|
||||
if(!MP)
|
||||
return 0 //Sanity, this should never happen.
|
||||
return 0
|
||||
|
||||
//Animals!
|
||||
if(ispath(MP, /mob/living/simple_animal/pet/cat))
|
||||
return 1
|
||||
if(ispath(MP, /mob/living/simple_animal/pet/corgi))
|
||||
@@ -415,15 +345,10 @@
|
||||
if(ispath(MP, /mob/living/simple_animal/butterfly))
|
||||
return 1
|
||||
|
||||
//Antag Creatures!
|
||||
if(ispath(MP, /mob/living/simple_animal/borer) && !jobban_isbanned(src, "alien") && !jobban_isbanned(src, "Syndicate"))
|
||||
return 1
|
||||
if(ispath(MP, /mob/living/simple_animal/hostile/statue) && !jobban_isbanned(src, "Syndicate"))
|
||||
return 1
|
||||
|
||||
//Friendly Creatures!
|
||||
|
||||
if(ispath(MP, /mob/living/simple_animal/diona) && !jobban_isbanned(src, "Dionaea"))
|
||||
return 1
|
||||
|
||||
//Not in here? Must be untested!
|
||||
return 0
|
||||
|
||||
@@ -69,11 +69,12 @@
|
||||
reagents.trans_to(M, gulp_size)
|
||||
|
||||
if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell
|
||||
var/mob/living/silicon/robot/bro = user
|
||||
bro.cell.use(30)
|
||||
var/mob/living/silicon/robot/borg = user
|
||||
borg.cell.use(30)
|
||||
var/refill = R.get_master_reagent_id()
|
||||
spawn(600)
|
||||
R.add_reagent(refill, fillevel)
|
||||
if(refill in drinks) // Only synthesize drinks
|
||||
spawn(600)
|
||||
R.add_reagent(refill, fillevel)
|
||||
|
||||
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
|
||||
return 1
|
||||
@@ -125,15 +126,16 @@
|
||||
user << "\blue You transfer [trans] units of the solution to [target]."
|
||||
|
||||
if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell
|
||||
var/mob/living/silicon/robot/bro = user
|
||||
var/chargeAmount = max(30,4*trans)
|
||||
bro.cell.use(chargeAmount)
|
||||
user << "Now synthesizing [trans] units of [refillName]..."
|
||||
if(refill in drinks) // Only synthesize drinks
|
||||
var/mob/living/silicon/robot/bro = user
|
||||
var/chargeAmount = max(30,4*trans)
|
||||
bro.cell.use(chargeAmount)
|
||||
user << "Now synthesizing [trans] units of [refillName]..."
|
||||
|
||||
|
||||
spawn(300)
|
||||
reagents.add_reagent(refill, trans)
|
||||
user << "Cyborg [src] refilled."
|
||||
spawn(300)
|
||||
reagents.add_reagent(refill, trans)
|
||||
user << "Cyborg [src] refilled."
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -14,11 +14,10 @@
|
||||
icon_state = "bottle16"
|
||||
reagent = "epinephrine"
|
||||
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("epinephrine", 60)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/robot/epinephrine/New()
|
||||
..()
|
||||
reagents.add_reagent("epinephrine", 60)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/robot/charcoal
|
||||
name = "internal charcoal bottle"
|
||||
@@ -27,7 +26,7 @@
|
||||
icon_state = "bottle17"
|
||||
reagent = "charcoal"
|
||||
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("charcoal", 60)
|
||||
return
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/robot/charcoal/New()
|
||||
..()
|
||||
reagents.add_reagent("charcoal", 60)
|
||||
return
|
||||
Reference in New Issue
Block a user