Merge pull request #2291 from Markolie/movefix

Fixes and pinpointer update
This commit is contained in:
Fox McCloud
2015-10-05 16:01:02 -04:00
30 changed files with 378 additions and 577 deletions
+3 -3
View File
@@ -2853,7 +2853,7 @@
"bcS" = (/turf/simulated/floor/wood,/area/crew_quarters/bar)
"bcT" = (/obj/structure/noticeboard{pixel_y = 32},/turf/simulated/floor/wood,/area/crew_quarters/bar)
"bcU" = (/obj/machinery/camera{c_tag = "Bar East"; network = list("SS13")},/obj/structure/flora/kirbyplants,/obj/machinery/newscaster{pixel_y = 32},/turf/simulated/floor/wood,/area/crew_quarters/bar)
"bcV" = (/obj/structure/table/reinforced,/obj/machinery/door/firedoor,/obj/machinery/door/poddoor/shutters{density = 0; dir = 8; icon_state = "shutter0"; id_tag = "kitchenbar"; name = "Kitchen Shutters"; opacity = 0},/obj/machinery/light{dir = 1},/turf/simulated/floor{icon_state = "grimy"},/area/crew_quarters/kitchen)
"bcV" = (/obj/structure/table/reinforced,/obj/machinery/door/firedoor,/obj/machinery/door/poddoor/shutters{density = 0; dir = 8; icon_state = "shutter0"; id_tag = "kitchenbar"; name = "Kitchen Shutters"; opacity = 0},/obj/machinery/light{dir = 1},/turf/simulated/floor{dir = 2; icon_state = "cafeteria"; tag = "icon-cafeteria (NORTHEAST)"},/area/crew_quarters/kitchen)
"bcW" = (/obj/machinery/disposal,/obj/structure/disposalpipe/trunk{dir = 4},/obj/machinery/light_switch{pixel_x = 0; pixel_y = 25},/turf/simulated/floor{dir = 2; icon_state = "cafeteria"; tag = "icon-cafeteria (NORTHEAST)"},/area/crew_quarters/kitchen)
"bcX" = (/obj/structure/sink/kitchen{pixel_y = 28},/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor{dir = 2; icon_state = "cafeteria"; tag = "icon-cafeteria (NORTHEAST)"},/area/crew_quarters/kitchen)
"bcY" = (/obj/structure/disposalpipe/segment{dir = 8; icon_state = "pipe-c"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor{dir = 2; icon_state = "cafeteria"; tag = "icon-cafeteria (NORTHEAST)"},/area/crew_quarters/kitchen)
@@ -2947,7 +2947,7 @@
"beI" = (/obj/structure/piano,/obj/machinery/light{dir = 8},/turf/simulated/floor/wood,/area/crew_quarters/bar)
"beJ" = (/obj/machinery/hologram/holopad,/turf/simulated/floor/wood,/area/crew_quarters/bar)
"beK" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/disposalpipe/segment,/turf/simulated/floor/wood,/area/crew_quarters/bar)
"beL" = (/obj/structure/table/reinforced,/obj/machinery/door/firedoor,/obj/machinery/door/poddoor/shutters{density = 0; dir = 8; icon_state = "shutter0"; id_tag = "kitchenbar"; name = "Kitchen Shutters"; opacity = 0},/turf/simulated/floor{icon_state = "grimy"},/area/crew_quarters/kitchen)
"beL" = (/obj/structure/table/reinforced,/obj/machinery/door/firedoor,/obj/machinery/door/poddoor/shutters{density = 0; dir = 8; icon_state = "shutter0"; id_tag = "kitchenbar"; name = "Kitchen Shutters"; opacity = 0},/turf/simulated/floor{dir = 2; icon_state = "cafeteria"; tag = "icon-cafeteria (NORTHEAST)"},/area/crew_quarters/kitchen)
"beM" = (/turf/simulated/floor{dir = 2; icon_state = "cafeteria"; tag = "icon-cafeteria (NORTHEAST)"},/area/crew_quarters/kitchen)
"beN" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor{dir = 2; icon_state = "cafeteria"; tag = "icon-cafeteria (NORTHEAST)"},/area/crew_quarters/kitchen)
"beO" = (/obj/machinery/camera{c_tag = "Kitchen"; network = list("SS13")},/obj/item/device/radio/intercom{broadcasting = 0; name = "station intercom (General)"; pixel_y = 25},/obj/machinery/kitchen_machine/candy_maker,/turf/simulated/floor{dir = 2; icon_state = "cafeteria"; tag = "icon-cafeteria (NORTHEAST)"},/area/crew_quarters/kitchen)
@@ -3414,7 +3414,7 @@
"bnH" = (/obj/machinery/camera{c_tag = "Bar South"; dir = 1; network = list("SS13")},/obj/machinery/atmospherics/unary/vent_scrubber{dir = 1; on = 1; scrub_N2O = 1; scrub_Toxins = 1},/turf/simulated/floor/wood,/area/crew_quarters/bar)
"bnI" = (/obj/item/device/radio/intercom{pixel_y = -30},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/light/small,/turf/simulated/floor/wood,/area/crew_quarters/bar)
"bnJ" = (/obj/machinery/atm{pixel_x = 32; pixel_y = 0},/obj/structure/flora/kirbyplants,/turf/simulated/floor{icon_state = "wood"},/area/crew_quarters/bar)
"bnK" = (/obj/structure/extinguisher_cabinet{pixel_x = 0; pixel_y = -30},/obj/machinery/vending/dinnerware,/turf/simulated/floor{icon_state = "grimy"},/area/crew_quarters/kitchen)
"bnK" = (/obj/structure/extinguisher_cabinet{pixel_x = 0; pixel_y = -30},/obj/machinery/vending/dinnerware,/turf/simulated/floor{dir = 2; icon_state = "cafeteria"; tag = "icon-cafeteria (NORTHEAST)"},/area/crew_quarters/kitchen)
"bnL" = (/obj/machinery/icemachine,/turf/simulated/floor{dir = 2; icon_state = "cafeteria"; tag = "icon-cafeteria (NORTHEAST)"},/area/crew_quarters/kitchen)
"bnM" = (/obj/structure/table/reinforced,/obj/item/weapon/storage/fancy/donut_box,/obj/machinery/door/firedoor,/obj/machinery/door/poddoor/shutters{density = 0; dir = 2; icon_state = "shutter0"; id_tag = "kitchenhall"; name = "Kitchen Shutters"; opacity = 0},/turf/simulated/floor{dir = 2; icon_state = "cafeteria"; tag = "icon-cafeteria (NORTHEAST)"},/area/crew_quarters/kitchen)
"bnN" = (/obj/structure/table/reinforced,/obj/machinery/door/firedoor,/obj/machinery/door/poddoor/shutters{density = 0; dir = 2; icon_state = "shutter0"; id_tag = "kitchenhall"; name = "Kitchen Shutters"; opacity = 0},/turf/simulated/floor{dir = 2; icon_state = "cafeteria"; tag = "icon-cafeteria (NORTHEAST)"},/area/crew_quarters/kitchen)
+1
View File
@@ -214,6 +214,7 @@ Pipelines + Other Objects -> Pipe network
initialize_directions = P
var/turf/T = loc
level = T.intact ? 2 : 1
add_fingerprint(usr)
initialize()
var/list/nodes = pipeline_expansion()
for(var/obj/machinery/atmospherics/A in nodes)
-1
View File
@@ -13,7 +13,6 @@
buckle_requires_restraints = 1
buckle_lying = -1
/obj/machinery/atmospherics/pipe/New()
..()
//so pipes under walls are hidden
+6 -1
View File
@@ -162,4 +162,9 @@
#define MAT_BANANIUM "$bananium"
#define MAX_STACK_SIZE 50
//The maximum size of a stack object.
//unmagic-strings for types of polls
#define POLLTYPE_OPTION "OPTION"
#define POLLTYPE_TEXT "TEXT"
#define POLLTYPE_RATING "NUMVAL"
#define POLLTYPE_MULTI "MULTICHOICE"
+1 -1
View File
@@ -21,4 +21,4 @@ var/list/restricted_camera_networks = list( //Those networks can only be accesse
"UO45",
"UO45R",
"Xeno"
)
)
+12
View File
@@ -0,0 +1,12 @@
// Base chemicals
var/list/base_chemicals = list("water","oxygen","nitrogen","hydrogen","potassium","mercury","carbon","chlorine","fluorine","phosphorus","lithium","sulfur","sacid","radium","iron","aluminum","silicon","sugar","ethanol")
// Standard chemicals
var/list/standard_chemicals = list("slimejelly","blood","water","lube","charcoal","toxin","cyanide","morphine","epinephrine","space_drugs","serotrotium","oxygen","copper","nitrogen","hydrogen","potassium","mercury","sulfur","carbon","chlorine","fluorine","sodium","phosphorus","lithium","sugar","sacid","facid","glycerol","radium","mutadone","thermite","mutagen","virusfood","iron","gold","silver","uranium","aluminum","silicon","fuel","cleaner","atrazine","plasma","teporone","lexorin","silver_sulfadiazine","salbutamol","perfluorodecalin","omnizine","synaptizine","haloperidol","potass_iodide","pen_acid","mannitol","oculine","styptic_powder","methamphetamine","cryoxadone","spaceacillin","carpotoxin","lsd","fluorosurfactant","fluorosurfactant","ethanol","ammonia","diethylamine","antihol","pancuronium","lipolicide","condensedcapsaicin","frostoil","amanitin","psilocybin","enzyme","nothing","salglu_solution","antifreeze","neurotoxin")
// Rare chemicals
var/list/rare_chemicals = list("minttoxin","nanites","xenomicrobes","adminordrazine")
// Standard medicines
var/list/standard_medicines = list("charcoal","toxin","cyanide","morphine","epinephrine","space_drugs","serotrotium","mutadone","mutagen","teporone","lexorin","silver_sulfadiazine","salbutamol","perfluorodecalin","omnizine","synaptizine","haloperidol","potass_iodide","pen_acid","mannitol","oculine","styptic_powder","methamphetamine","spaceacillin","carpotoxin","lsd","ethanol","ammonia","diethylamine","antihol","pancuronium","lipolicide","condensedcapsaicin","frostoil","amanitin","psilocybin","nothing","salglu_solution","neurotoxin")
// Rare medicines
var/list/rare_medicines = list("nanites","xenomicrobes","minttoxin","adminordrazine","blood")
// Drinks
var/list/drinks = list("beer2","hot_coco","orangejuice","tomatojuice","limejuice","carrotjuice","berryjuice","poisonberryjuice","watermelonjuice","lemonjuice","banana","nothing","potato","milk","soymilk","cream","coffee","tea","icecoffee","icetea","cola","nuka_cola","spacemountainwind","thirteenloko","dr_gibb","space_up","lemon_lime","beer","whiskey","gin","rum","vodka","holywater","tequilla","vermouth","wine","tonic","kahlua","cognac","ale","sodawater","ice","bilk","atomicbomb","threemileisland","goldschlager","patron","gintonic","cubalibre","whiskeycola","martini","vodkamartini","whiterussian","screwdrivercocktail","booger","bloodymary","gargleblaster","bravebull","tequillasunrise","toxinsspecial","beepskysmash","salglu_solution","irishcream","manlydorf","longislandicedtea","moonshine","b52","irishcoffee","margarita","blackrussian","manhattan","manhattan_proj","whiskeysoda","antifreeze","barefoot","snowwhite","demonsblood","vodkatonic","ginfizz","bahama_mama","singulo","sbiten","devilskiss","red_mead","mead","iced_beer","grog","aloe","andalusia","alliescocktail","soy_latte","cafe_latte","acidspit","amasec","neurotoxin","hippiesdelight","bananahonk","silencer","changelingsting","irishcarbomb","syndicatebomb","erikasurprise","driestmartini")
+5 -5
View File
@@ -767,11 +767,11 @@ var/list/uplink_items = list()
cost = 3
gamemodes = list("nuclear emergency")
/datum/uplink_item/device_tools/pdapinpointer
name = "PDA Pinpointer"
desc = "A pinpointer that tracks any PDA on the station. Useful for locating assassination targets or other high-value targets that you can't find. WARNING: Can only set once."
reference = "PDAP"
item = /obj/item/weapon/pinpointer/pdapinpointer
/datum/uplink_item/device_tools/advpinpointer
name = "Advanced Pinpointer"
desc = "A pinpointer that tracks any specified coordinates, DNA string, high value item or the nuclear authentication disk."
reference = "ADVP"
item = /obj/item/weapon/pinpointer/advpinpointer
cost = 4
/datum/uplink_item/device_tools/ai_detector
+5 -4
View File
@@ -36,11 +36,12 @@
..()
block=RADBLOCK
OnMobLife(var/mob/owner)
owner.radiation = max(owner.radiation, 20)
OnMobLife(var/mob/living/owner)
owner.apply_effect(max(owner.radiation, 20), IRRADIATE)
for(var/mob/living/L in range(1, owner))
if(L == owner) continue
L << "\red You are enveloped by a soft green glow emanating from [owner]."
if(L == owner)
continue
L << "<span class='danger'>You are enveloped by a soft green glow emanating from [owner].</span>"
L.apply_effect(5, IRRADIATE)
return
+1 -1
View File
@@ -13,7 +13,7 @@
mode = 1
active = 1
target = mutiny.captains_key
workobj()
point_at(target)
usr << "\blue You calibrate \the [src] to locate the Captain's Authentication Key."
if (1)
mode = 2
@@ -8,7 +8,7 @@
mode = 1
active = 1
target = locate(/obj/item/flag/nation/atmos)
workobj()
point_at(target)
usr << "\blue You calibrate \the [src] to locate the [target.name]"
if (1)
mode = 2
+248 -380
View File
@@ -12,396 +12,26 @@
var/obj/item/weapon/disk/nuclear/the_disk = null
var/active = 0
Destroy()
active = 0
the_disk = null
return ..()
attack_self()
if(!active)
active = 1
workdisk()
usr << "\blue You activate the pinpointer"
else
active = 0
icon_state = "pinoff"
usr << "\blue You deactivate the pinpointer"
proc/workdisk()
if(!active) return
if(!the_disk)
the_disk = locate()
if(!the_disk)
icon_state = "pinonnull"
return
dir = get_dir(src,the_disk)
switch(get_dist(src,the_disk))
if(0)
icon_state = "pinondirect"
if(1 to 8)
icon_state = "pinonclose"
if(9 to 16)
icon_state = "pinonmedium"
if(16 to INFINITY)
icon_state = "pinonfar"
spawn(5) .()
examine(mob/user)
..(user)
for(var/obj/machinery/nuclearbomb/bomb in world)
if(bomb.timing)
user << "Extreme danger. Arming signal detected. Time remaining: [bomb.timeleft]"
/obj/item/weapon/pinpointer/advpinpointer
name = "Advanced Pinpointer"
icon = 'icons/obj/device.dmi'
desc = "A larger version of the normal pinpointer, this unit features a helpful quantum entanglement detection system to locate various objects that do not broadcast a locator signal."
var/mode = 0 // Mode 0 locates disk, mode 1 locates coordinates.
var/turf/location = null
var/obj/target = null
attack_self()
if(!active)
active = 1
if(mode == 0)
workdisk()
if(mode == 1)
worklocation()
if(mode == 2)
workobj()
usr << "\blue You activate the pinpointer"
else
active = 0
icon_state = "pinoff"
usr << "\blue You deactivate the pinpointer"
proc/worklocation()
if(!active)
return
if(!location)
icon_state = "pinonnull"
return
dir = get_dir(src,location)
switch(get_dist(src,location))
if(0)
icon_state = "pinondirect"
if(1 to 8)
icon_state = "pinonclose"
if(9 to 16)
icon_state = "pinonmedium"
if(16 to INFINITY)
icon_state = "pinonfar"
spawn(5) .()
proc/workobj()
if(!active)
return
if(!target)
icon_state = "pinonnull"
return
dir = get_dir(src,target)
switch(get_dist(src,target))
if(0)
icon_state = "pinondirect"
if(1 to 8)
icon_state = "pinonclose"
if(9 to 16)
icon_state = "pinonmedium"
if(16 to INFINITY)
icon_state = "pinonfar"
spawn(5) .()
/obj/item/weapon/pinpointer/advpinpointer/verb/toggle_mode()
set category = "Object"
set name = "Toggle Pinpointer Mode"
set src in view(1)
/obj/item/weapon/pinpointer/Destroy()
active = 0
icon_state = "pinoff"
target=null
location = null
the_disk = null
return ..()
switch(alert("Please select the mode you want to put the pinpointer in.", "Pinpointer Mode Select", "Location", "Disk Recovery", "Other Signature"))
if("Location")
mode = 1
var/locationx = input(usr, "Please input the x coordinate to search for.", "Location?" , "") as num
if(!locationx || !(usr in view(1,src)))
return
var/locationy = input(usr, "Please input the y coordinate to search for.", "Location?" , "") as num
if(!locationy || !(usr in view(1,src)))
return
var/turf/Z = get_turf(src)
location = locate(locationx,locationy,Z.z)
usr << "You set the pinpointer to locate [locationx],[locationy]"
return attack_self()
if("Disk Recovery")
mode = 0
return attack_self()
if("Other Signature")
mode = 2
switch(alert("Search for item signature or DNA fragment?" , "Signature Mode Select" , "" , "Item" , "DNA"))
if("Item")
var/list/item_names[0]
var/list/item_paths[0]
for(var/typepath in potential_theft_objectives)
var/obj/item/tmp_object=new typepath
var/n="[tmp_object]"
item_names+=n
item_paths[n]=typepath
qdel(tmp_object)
var/targetitem = input("Select item to search for.", "Item Mode Select","") as null|anything in potential_theft_objectives
if(!targetitem)
return
target=locate(item_paths[targetitem])
if(!target)
usr << "Failed to locate [targetitem]!"
return
usr << "You set the pinpointer to locate [targetitem]"
if("DNA")
var/DNAstring = input("Input DNA string to search for." , "Please Enter String." , "")
if(!DNAstring)
return
for(var/mob/living/carbon/M in mob_list)
if(!M.dna)
continue
if(M.dna.unique_enzymes == DNAstring)
target = M
break
return attack_self()
///////////////////////
//nuke op pinpointers//
///////////////////////
/obj/item/weapon/pinpointer/nukeop
var/mode = 0 //Mode 0 locates disk, mode 1 locates the shuttle
var/obj/machinery/computer/shuttle_control/multi/syndicate/home = null
slot_flags = SLOT_PDA | SLOT_BELT
/obj/item/weapon/pinpointer/nukeop/attack_self(mob/user as mob)
/obj/item/weapon/pinpointer/attack_self()
if(!active)
active = 1
if(!mode)
workdisk()
user << "<span class='notice'>Authentication Disk Locator active.</span>"
else
worklocation()
user << "<span class='notice'>Shuttle Locator active.</span>"
else
active = 0
icon_state = "pinoff"
user << "<span class='notice'>You deactivate the pinpointer.</span>"
/obj/item/weapon/pinpointer/nukeop/workdisk()
if(!active) return
if(mode) //Check in case the mode changes while operating
worklocation()
return
if(bomb_set) //If the bomb is set, lead to the shuttle
mode = 1 //Ensures worklocation() continues to work
worklocation()
playsound(loc, 'sound/machines/twobeep.ogg', 50, 1) //Plays a beep
visible_message("Shuttle Locator active.") //Lets the mob holding it know that the mode has changed
return //Get outta here
if(!the_disk)
the_disk = locate()
if(!the_disk)
icon_state = "pinonnull"
return
// if(loc.z != the_disk.z) //If you are on a different z-level from the disk
// icon_state = "pinonnull"
// else
dir = get_dir(src, the_disk)
switch(get_dist(src, the_disk))
if(0)
icon_state = "pinondirect"
if(1 to 8)
icon_state = "pinonclose"
if(9 to 16)
icon_state = "pinonmedium"
if(16 to INFINITY)
icon_state = "pinonfar"
spawn(5) .()
/obj/item/weapon/pinpointer/nukeop/proc/worklocation()
if(!active) return
if(!mode)
workdisk()
return
if(!bomb_set)
mode = 0
workdisk()
playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
visible_message("<span class='notice'>Authentication Disk Locator active.</span>")
return
if(!home)
home = locate()
if(!home)
icon_state = "pinonnull"
return
if(loc.z != home.z) //If you are on a different z-level from the shuttle
icon_state = "pinonnull"
else
dir = get_dir(src, home)
switch(get_dist(src, home))
if(0)
icon_state = "pinondirect"
if(1 to 8)
icon_state = "pinonclose"
if(9 to 16)
icon_state = "pinonmedium"
if(16 to INFINITY)
icon_state = "pinonfar"
spawn(5) .()
/obj/item/weapon/pinpointer/pdapinpointer
name = "pda pinpointer"
desc = "A pinpointer that has been illegally modified to track the PDA of a crewmember for malicious reasons."
var/obj/target = null
var/used = 0
attack_self()
if(!active)
active = 1
point_at(target)
usr << "\blue You activate the pinpointer"
else
active = 0
icon_state = "pinoff"
usr << "\blue You deactivate the pinpointer"
verb/select_pda()
set category = "Object"
set name = "Select pinpointer target"
set src in view(1)
if(used)
usr << "Target has already been set!"
return
var/list/L = list()
L["Cancel"] = "Cancel"
var/length = 1
for (var/obj/item/device/pda/P in world)
if(P.name != "\improper PDA")
L[text("([length]) [P.name]")] = P
length++
var/t = input("Select pinpointer target. WARNING: Can only set once.") as null|anything in L
if(t == "Cancel")
return
target = L[t]
if(!target)
usr << "Failed to locate [target]!"
return
active = 1
point_at(target)
usr << "You set the pinpointer to locate [target]"
used = 1
examine(mob/user)
..(user)
if (target)
user << "\blue Tracking [target]"
proc/point_at(atom/target)
if(!active)
return
if(!target)
icon_state = "pinonnull"
return
var/turf/T = get_turf(target)
var/turf/L = get_turf(src)
if((!T) || (!L)) // Someone is no longer in the world...
icon_state = "pinonnull"
return
if(T.z != L.z)
icon_state = "pinonnull"
else
dir = get_dir(L, T)
switch(get_dist(L, T))
if(-1)
icon_state = "pinondirect"
if(1 to 8)
icon_state = "pinonclose"
if(9 to 16)
icon_state = "pinonmedium"
if(16 to INFINITY)
icon_state = "pinonfar"
spawn(5)
.()
/obj/item/weapon/pinpointer/operative
name = "operative pinpointer"
icon = 'icons/obj/device.dmi'
desc = "A pinpointer that leads to the first Syndicate operative detected."
var/mob/living/carbon/nearest_op = null
/obj/item/weapon/pinpointer/operative/attack_self()
if(!usr.mind || !(usr.mind in ticker.mode.syndicates))
usr << "<span class='danger'>AUTHENTICATION FAILURE. ACCESS DENIED.</span>"
return 0
if(!active)
active = 1
workop()
usr << "<span class='notice'>You activate the pinpointer.</span>"
else
active = 0
icon_state = "pinoff"
usr << "<span class='notice'>You deactivate the pinpointer.</span>"
/obj/item/weapon/pinpointer/proc/scandisk()
if(!the_disk)
the_disk = locate()
/obj/item/weapon/pinpointer/operative/proc/scan_for_ops()
if(active)
nearest_op = null //Resets nearest_op every time it scans
var/closest_distance = 1000
for(var/mob/living/carbon/M in mob_list)
if(M.mind && (M.mind in ticker.mode.syndicates))
if(get_dist(M, get_turf(src)) < closest_distance) //Actually points toward the nearest op, instead of a random one like it used to
nearest_op = M
if(!nearest_op) // There are simply no operatives left to point to
active = 0
icon_state = "pinoff"
/obj/item/weapon/pinpointer/operative/proc/workop()
if(active)
scan_for_ops()
point_at(nearest_op, 0)
spawn(5)
.()
else
return 0
/obj/item/weapon/pinpointer/operative/examine(mob/user)
..()
if(active)
if(nearest_op)
user << "Nearest operative detected is <i>[nearest_op.real_name].</i>"
else
user << "No operatives detected within scanning range."
/obj/item/weapon/pinpointer/operative/proc/point_at(atom/target, spawnself = 1)
/obj/item/weapon/pinpointer/proc/point_at(atom/target, spawnself = 1)
if(!active)
return
if(!target)
@@ -426,4 +56,242 @@
icon_state = "pinonfar"
if(spawnself)
spawn(5)
.()
.()
/obj/item/weapon/pinpointer/proc/workdisk()
scandisk()
point_at(the_disk, 0)
spawn(5)
.()
/obj/item/weapon/pinpointer/examine(mob/user)
..(user)
for(var/obj/machinery/nuclearbomb/bomb in machines)
if(bomb.timing)
user << "Extreme danger. Arming signal detected. Time remaining: [bomb.timeleft]"
/obj/item/weapon/pinpointer/advpinpointer
name = "advanced pinpointer"
desc = "A larger version of the normal pinpointer, this unit features a helpful quantum entanglement detection system to locate various objects that do not broadcast a locator signal."
var/mode = 0 // Mode 0 locates disk, mode 1 locates coordinates.
var/turf/location = null
var/obj/target = null
/obj/item/weapon/pinpointer/advpinpointer/attack_self()
if(!active)
active = 1
if(mode == 0)
workdisk()
if(mode == 1)
point_at(location)
if(mode == 2)
point_at(target)
usr << "<span class='notice'>You activate the pinpointer.</span>"
else
active = 0
icon_state = "pinoff"
usr << "<span class='notice'>You deactivate the pinpointer.</span>"
/obj/item/weapon/pinpointer/advpinpointer/workdisk()
if(mode == 0)
scandisk()
point_at(the_disk, 0)
spawn(5)
.()
/obj/item/weapon/pinpointer/advpinpointer/verb/toggle_mode()
set category = "Object"
set name = "Toggle Pinpointer Mode"
set src in usr
if(usr.stat || usr.restrained())
return
active = 0
icon_state = "pinoff"
target = null
location = null
switch(alert("Please select the mode you want to put the pinpointer in.", "Pinpointer Mode Select", "Location", "Disk Recovery", "Other Signature"))
if("Location")
mode = 1
var/locationx = input(usr, "Please input the x coordinate to search for.", "Location?" , "") as num
if(!locationx || !(usr in view(1,src)))
return
var/locationy = input(usr, "Please input the y coordinate to search for.", "Location?" , "") as num
if(!locationy || !(usr in view(1,src)))
return
var/turf/Z = get_turf(src)
location = locate(locationx,locationy,Z.z)
usr << "<span class='notice'>You set the pinpointer to locate [locationx],[locationy]</span>"
return attack_self()
if("Disk Recovery")
mode = 0
return attack_self()
if("Other Signature")
mode = 2
switch(alert("Search for item signature or DNA fragment?" , "Signature Mode Select" , "Item" , "DNA"))
if("Item")
var/list/item_names[0]
var/list/item_paths[0]
for(var/objective in potential_theft_objectives)
var/datum/theft_objective/T = objective
var/name = initial(T.name)
item_names += name
item_paths[name] = initial(T.typepath)
var/targetitem = input("Select item to search for.", "Item Mode Select","") as null|anything in item_names
if(!targetitem)
return
target = locate(item_paths[targetitem])
if(!target)
usr << "<span class='warning'>Failed to locate [targetitem]!</span>"
return
usr << "<span class='notice'>You set the pinpointer to locate [targetitem].</span>"
if("DNA")
var/DNAstring = input("Input DNA string to search for." , "Please Enter String." , "")
if(!DNAstring)
return
for(var/mob/living/carbon/C in mob_list)
if(!C.dna)
continue
if(C.dna.unique_enzymes == DNAstring)
target = C
break
return attack_self()
///////////////////////
//nuke op pinpointers//
///////////////////////
/obj/item/weapon/pinpointer/nukeop
var/mode = 0 //Mode 0 locates disk, mode 1 locates the shuttle
var/obj/machinery/computer/shuttle_control/multi/syndicate/home = null
slot_flags = SLOT_PDA | SLOT_BELT
/obj/item/weapon/pinpointer/nukeop/attack_self(mob/user as mob)
if(!active)
active = 1
if(!mode)
workdisk()
user << "<span class='notice'>Authentication Disk Locator active.</span>"
else
worklocation()
user << "<span class='notice'>Shuttle Locator active.</span>"
else
active = 0
icon_state = "pinoff"
user << "<span class='notice'>You deactivate the pinpointer.</span>"
/obj/item/weapon/pinpointer/nukeop/workdisk()
if(!active) return
if(mode) //Check in case the mode changes while operating
worklocation()
return
if(bomb_set) //If the bomb is set, lead to the shuttle
mode = 1 //Ensures worklocation() continues to work
worklocation()
playsound(loc, 'sound/machines/twobeep.ogg', 50, 1) //Plays a beep
visible_message("Shuttle Locator mode actived.") //Lets the mob holding it know that the mode has changed
return //Get outta here
scandisk()
if(!the_disk)
icon_state = "pinonnull"
return
dir = get_dir(src, the_disk)
switch(get_dist(src, the_disk))
if(0)
icon_state = "pinondirect"
if(1 to 8)
icon_state = "pinonclose"
if(9 to 16)
icon_state = "pinonmedium"
if(16 to INFINITY)
icon_state = "pinonfar"
spawn(5) .()
/obj/item/weapon/pinpointer/nukeop/proc/worklocation()
if(!active)
return
if(!mode)
workdisk()
return
if(!bomb_set)
mode = 0
workdisk()
playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
visible_message("<span class='notice'>Authentication Disk Locator mode actived.</span>")
return
if(!home)
home = locate()
if(!home)
icon_state = "pinonnull"
return
if(loc.z != home.z) //If you are on a different z-level from the shuttle
icon_state = "pinonnull"
else
dir = get_dir(src, home)
switch(get_dist(src, home))
if(0)
icon_state = "pinondirect"
if(1 to 8)
icon_state = "pinonclose"
if(9 to 16)
icon_state = "pinonmedium"
if(16 to INFINITY)
icon_state = "pinonfar"
spawn(5)
.()
/obj/item/weapon/pinpointer/operative
name = "operative pinpointer"
desc = "A pinpointer that leads to the first Syndicate operative detected."
var/mob/living/carbon/nearest_op = null
/obj/item/weapon/pinpointer/operative/attack_self()
if(!usr.mind || !(usr.mind in ticker.mode.syndicates))
usr << "<span class='danger'>AUTHENTICATION FAILURE. ACCESS DENIED.</span>"
return 0
if(!active)
active = 1
workop()
usr << "<span class='notice'>You activate the pinpointer.</span>"
else
active = 0
icon_state = "pinoff"
usr << "<span class='notice'>You deactivate the pinpointer.</span>"
/obj/item/weapon/pinpointer/operative/proc/scan_for_ops()
if(active)
nearest_op = null //Resets nearest_op every time it scans
var/closest_distance = 1000
for(var/mob/living/carbon/M in mob_list)
if(M.mind && (M.mind in ticker.mode.syndicates))
if(get_dist(M, get_turf(src)) < closest_distance) //Actually points toward the nearest op, instead of a random one like it used to
nearest_op = M
/obj/item/weapon/pinpointer/operative/proc/workop()
if(active)
scan_for_ops()
point_at(nearest_op, 0)
spawn(5)
.()
else
return 0
/obj/item/weapon/pinpointer/operative/examine(mob/user)
..()
if(active)
if(nearest_op)
user << "Nearest operative detected is <i>[nearest_op.real_name].</i>"
else
user << "No operatives detected within scanning range."
-3
View File
@@ -607,9 +607,6 @@
src.add_hiddenprint(user)
return ui_interact(user)
/obj/machinery/alarm/attack_robot(mob/user)
return attack_ai(user)
/obj/machinery/alarm/attack_ghost(user as mob)
if(stat & (BROKEN|MAINT))
return
+8 -8
View File
@@ -337,8 +337,6 @@ Class Procs:
return src.attack_hand(user)
/obj/machinery/attack_hand(mob/user as mob)
if(!interact_offline && stat & (NOPOWER|BROKEN|MAINT))
return 1
if(user.lying || user.stat)
return 1
@@ -346,11 +344,6 @@ Class Procs:
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
return 1
/*
//distance checks are made by atom/proc/DblClick
if ((get_dist(src, user) > 1 || !istype(src.loc, /turf)) && !istype(user, /mob/living/silicon))
return 1
*/
if (ishuman(user))
var/mob/living/carbon/human/H = user
if(H.getBrainLoss() >= 60)
@@ -359,10 +352,17 @@ Class Procs:
else if(prob(H.getBrainLoss()))
user << "<span class='warning'>You momentarily forget how to use [src].</span>"
return 1
if(panel_open)
src.add_fingerprint(user)
return 0
if(!interact_offline && stat & (NOPOWER|BROKEN|MAINT))
return 1
src.add_fingerprint(user)
return 0
return ..()
/obj/machinery/CheckParts()
RefreshParts()
+13 -19
View File
@@ -145,20 +145,23 @@
for(var/obj/O in um)
// Engineering
if(istype(O,/obj/item/stack/sheet/metal) || istype(O,/obj/item/stack/sheet/rglass) || istype(O,/obj/item/stack/cable_coil))
if(O:amount < 50)
O:amount += 1 * coeff
var/obj/item/stack/sheet/S = O
if(S.amount < 50)
S.amount += 1 * coeff
// Security
if(istype(O,/obj/item/device/flash))
if(O:broken)
O:broken = 0
O:times_used = 0
O:icon_state = "flash"
var/obj/item/device/flash/F = O
if(F.broken)
F.broken = 0
F.times_used = 0
F.icon_state = "flash"
if(istype(O,/obj/item/weapon/gun/energy/disabler/cyborg))
if(O:power_supply.charge < O:power_supply.maxcharge)
O:power_supply.give(O:charge_cost)
O:update_icon()
var/obj/item/weapon/gun/energy/disabler/cyborg/D = O
if(D.power_supply.charge < D.power_supply.maxcharge)
D.power_supply.give(D.charge_cost)
D.update_icon()
else
O:charge_tick = 0
D.charge_tick = 0
if(istype(O,/obj/item/weapon/melee/baton))
var/obj/item/weapon/melee/baton/B = O
if(B.bcell)
@@ -178,15 +181,6 @@
var/i = 1
for(1, i <= coeff, i++)
LR.Charge(occupant)
//Alien
if(istype(O,/obj/item/weapon/reagent_containers/spray/alien/smoke))
if(O.reagents.get_reagent_amount("water") < 50)
O.reagents.add_reagent("water", 2 * coeff)
if(istype(O,/obj/item/weapon/reagent_containers/spray/alien/stun))
if(O.reagents.get_reagent_amount("ether") < 250)
O.reagents.add_reagent("ether", 2 * coeff)
if(R)
if(R.module)
R.module.respawn_consumable(R)
+5
View File
@@ -12,6 +12,11 @@
. = ..()
if(can_buckle && buckled_mob)
return user_unbuckle_mob(user)
/atom/movable/attack_robot(mob/living/user)
. = ..()
if(can_buckle && buckled_mob && Adjacent(user)) // attack_robot is called on all ranges, so the Adjacent check is needed
return user_unbuckle_mob(user)
/atom/movable/MouseDrop_T(mob/living/M, mob/living/user)
. = ..()
+14 -21
View File
@@ -47,8 +47,7 @@
New()
..()
var/datum/reagent/R = pick(chemical_reagents_list)
var/global/list/rare_chems = list("minttoxin","nanites","xenomicrobes","adminordrazine")
if(rare_chems.Find(R))
if(rare_chemicals.Find(R))
reagents.add_reagent(R,10)
else
reagents.add_reagent(R,rand(2,3)*10)
@@ -61,11 +60,9 @@
// identify_probability = 0
New()
..()
var/global/list/chems_only = list("slimejelly","blood","water","lube","charcoal","toxin","cyanide","morphine","epinephrine","space_drugs","serotrotium","oxygen","copper","nitrogen","hydrogen","potassium","mercury","sulfur","carbon","chlorine","fluorine","sodium","phosphorus","lithium","sugar","sacid","facid","glycerol","radium","mutadone","thermite","mutagen","virusfood","iron","gold","silver","uranium","aluminum","silicon","fuel","cleaner","atrazine","plasma","teporone","lexorin","silver_sulfadiazine","salbutamol","perfluorodecalin","omnizine","synaptizine","haloperidol","potass_iodide","pen_acid","mannitol","oculine","styptic_powder","methamphetamine","cryoxadone","spaceacillin","carpotoxin","lsd","fluorosurfactant","fluorosurfactant","ethanol","ammonia","diethylamine","antihol","pancuronium","lipolicide","condensedcapsaicin","frostoil","amanitin","psilocybin","enzyme","nothing","salglu_solution","antifreeze","neurotoxin")
var/global/list/rare_chems = list("minttoxin","nanites","xenomicrobes","adminordrazine")
var/datum/reagent/R = pick(chems_only + rare_chems)
if(rare_chems.Find(R))
var/datum/reagent/R = pick(standard_chemicals + rare_chemicals)
if(rare_chemicals.Find(R))
reagents.add_reagent(R,10)
else
reagents.add_reagent(R,rand(2,3)*10)
@@ -78,35 +75,35 @@
// identify_probability = 0
New()
..()
var/global/list/base_chems = list("water","oxygen","nitrogen","hydrogen","potassium","mercury","carbon","chlorine","fluorine","phosphorus","lithium","sulfur","sacid","radium","iron","aluminum","silicon","sugar","ethanol")
var/datum/reagent/R = pick(base_chems)
var/datum/reagent/R = pick(base_chemicals)
reagents.add_reagent(R,rand(2,6)*5)
name = "unlabelled bottle"
pixel_x = rand(-10,10)
pixel_y = rand(-10,10)
/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink
name = "unlabelled drink"
icon = 'icons/obj/drinks.dmi'
New()
..()
var/list/drinks_only = list("beer2","hot_coco","orangejuice","tomatojuice","limejuice","carrotjuice","berryjuice","poisonberryjuice","watermelonjuice","lemonjuice","banana","nothing","potato","milk","soymilk","cream","coffee","tea","icecoffee","icetea","cola","nuka_cola","spacemountainwind","thirteenloko","dr_gibb","space_up","lemon_lime","beer","whiskey","gin","rum","vodka","holywater","tequilla","vermouth","wine","tonic","kahlua","cognac","ale","sodawater","ice","bilk","atomicbomb","threemileisland","goldschlager","patron","gintonic","cubalibre","whiskeycola","martini","vodkamartini","whiterussian","screwdrivercocktail","booger","bloodymary","gargleblaster","bravebull","tequillasunrise","toxinsspecial","beepskysmash","salglu_solution","irishcream","manlydorf","longislandicedtea","moonshine","b52","irishcoffee","margarita","blackrussian","manhattan","manhattan_proj","whiskeysoda","antifreeze","barefoot","snowwhite","demonsblood","vodkatonic","ginfizz","bahama_mama","singulo","sbiten","devilskiss","red_mead","mead","iced_beer","grog","aloe","andalusia","alliescocktail","soy_latte","cafe_latte","acidspit","amasec","neurotoxin","hippiesdelight","bananahonk","silencer","changelingsting","irishcarbomb","syndicatebomb","erikasurprise","driestmartini")
var/list/additional_drinks = list()
if(prob(50))
drinks_only += list("pancuronium","adminordrazine","lsd","omnizine","blood")
additional_drinks += list("pancuronium","adminordrazine","lsd","omnizine","blood")
var/datum/reagent/R = pick(drinks_only)
var/datum/reagent/R = pick(drinks + additional_drinks)
reagents.add_reagent(R,volume)
name = "unlabelled bottle"
icon_state = pick("alco-white","alco-green","alco-blue","alco-clear","alco-red")
pixel_x = rand(-5,5)
pixel_y = rand(-5,5)
/obj/item/weapon/reagent_containers/food/drinks/bottle/random_reagent // Same as the chembottle code except the container
name = "unlabelled drink?"
icon = 'icons/obj/drinks.dmi'
New()
..()
var/datum/reagent/R = pick(chemical_reagents_list)
var/global/list/rare_chems = list("minttoxin","nanites","xenomicrobes","adminordrazine")
if(rare_chems.Find(R))
if(rare_chemicals.Find(R))
reagents.add_reagent(R,10)
else
reagents.add_reagent(R,rand(3,10)*10)
@@ -123,20 +120,17 @@
New()
..()
var/global/list/meds_only = list("charcoal","toxin","cyanide","morphine","epinephrine","space_drugs","serotrotium","mutadone","mutagen","teporone","lexorin","silver_sulfadiazine","salbutamol","perfluorodecalin","omnizine","synaptizine","haloperidol","potass_iodide","pen_acid","mannitol","oculine","styptic_powder","methamphetamine","spaceacillin","carpotoxin","lsd","ethanol","ammonia","diethylamine","antihol","pancuronium","lipolicide","condensedcapsaicin","frostoil","amanitin","psilocybin","nothing","salglu_solution","neurotoxin")
var/global/list/rare_meds = list("nanites","xenomicrobes","minttoxin","adminordrazine","blood")
var/i = 1
while(i < storage_slots)
var/datum/reagent/R
if(prob(50))
R = pick(meds_only + rare_meds)
R = pick(standard_medicines + rare_medicines)
else
R = pick(meds_only)
R = pick(standard_medicines)
var/obj/item/weapon/reagent_containers/pill/P = new(src)
if(rare_meds.Find(R))
if(rare_medicines.Find(R))
P.reagents.add_reagent(R,10)
else
P.reagents.add_reagent(R,rand(2,5)*10)
@@ -185,8 +179,7 @@
New()
..()
sleep(2)
var/global/list/base_chems = list("water","oxygen","nitrogen","hydrogen","potassium","mercury","carbon","chlorine","fluorine","phosphorus","lithium","sulfur","sacid","radium","iron","aluminum","silicon","sugar","ethanol")
for(var/chem in base_chems)
for(var/chem in standard_chemicals)
var/obj/item/weapon/reagent_containers/glass/bottle/B = new(src)
B.reagents.add_reagent(chem,B.volume)
if(prob(85))
@@ -30,6 +30,11 @@
if(buckled_mob)
if(buckled_mob.incapacitated())
return 0
var/mob/living/thedriver = user
var/mob_delay = thedriver.movement_delay()
if(mob_delay > 0)
move_delay += mob_delay
if(ishuman(buckled_mob))
var/mob/living/carbon/human/driver = user
+5 -4
View File
@@ -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> | "
+7 -7
View File
@@ -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
-5
View File
@@ -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
-2
View File
@@ -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
+7 -7
View File
@@ -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
+2 -77
View File
@@ -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
Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 31 KiB

+1
View File
@@ -75,6 +75,7 @@
#include "code\_globalvars\lists\mobs.dm"
#include "code\_globalvars\lists\names.dm"
#include "code\_globalvars\lists\objects.dm"
#include "code\_globalvars\lists\reagents.dm"
#include "code\_hooks\area.dm"
#include "code\_hooks\hooks.dm"
#include "code\_hooks\mob.dm"