Merge branch 'master' into upstream-merge-29885

This commit is contained in:
LetterJay
2017-08-14 19:41:45 -05:00
committed by GitHub
58 changed files with 2441 additions and 568 deletions
+11 -10
View File
@@ -1,15 +1,16 @@
//Investigate logging defines
#define INVESTIGATE_ATMOS "atmos"
#define INVESTIGATE_BOTANY "botany"
#define INVESTIGATE_CARGO "cargo"
#define INVESTIGATE_EXPERIMENTOR "experimentor"
#define INVESTIGATE_GRAVITY "gravity"
#define INVESTIGATE_RECORDS "records"
#define INVESTIGATE_SINGULO "singulo"
#define INVESTIGATE_SUPERMATTER "supermatter"
#define INVESTIGATE_TELESCI "telesci"
#define INVESTIGATE_WIRES "wires"
#define INVESTIGATE_ATMOS "atmos"
#define INVESTIGATE_BOTANY "botany"
#define INVESTIGATE_CARGO "cargo"
#define INVESTIGATE_EXPERIMENTOR "experimentor"
#define INVESTIGATE_GRAVITY "gravity"
#define INVESTIGATE_RECORDS "records"
#define INVESTIGATE_SINGULO "singulo"
#define INVESTIGATE_SUPERMATTER "supermatter"
#define INVESTIGATE_TELESCI "telesci"
#define INVESTIGATE_WIRES "wires"
#define INVESTIGATE_PORTAL "portals"
#define INVESTIGATE_HALLUCINATIONS "hallucinations"
//Individual logging defines
#define INDIVIDUAL_ATTACK_LOG "Attack log"
+9
View File
@@ -0,0 +1,9 @@
diff a/code/__DEFINES/logging.dm b/code/__DEFINES/logging.dm (rejected hunks)
@@ -9,6 +9,7 @@
#define INVESTIGATE_SUPERMATTER "supermatter"
#define INVESTIGATE_TELESCI "telesci"
#define INVESTIGATE_WIRES "wires"
+#define INVESTIGATE_HALLUCINATIONS "hallucinations"
//Individual logging defines
#define INDIVIDUAL_ATTACK_LOG "Attack log"
+5 -5
View File
@@ -250,7 +250,7 @@ SUBSYSTEM_DEF(blackbox)
return 0
return value
/datum/feedback_variable/proc/get_variable()
/datum/feedback_variable/proc/get_variable()
return variable
/datum/feedback_variable/proc/set_details(text)
@@ -260,12 +260,12 @@ SUBSYSTEM_DEF(blackbox)
/datum/feedback_variable/proc/add_details(text)
if (istext(text))
if (!details)
details = text
details = "\"[text]\""
else
details += " [text]"
details += " | \"[text]\""
/datum/feedback_variable/proc/get_details()
/datum/feedback_variable/proc/get_details()
return details
/datum/feedback_variable/proc/get_parsed()
return list(variable,value,details)
return list(variable,value,details)
+3 -2
View File
@@ -169,7 +169,7 @@
/datum/action/item_action/toggle_firemode
name = "Toggle Firemode"
/datum/action/item_action/rcl
name = "Change Cable Color"
button_icon_state = "rcl_rainbow"
@@ -490,7 +490,8 @@
var/obj/effect/proc_holder/spell/S = target
S.action = src
name = S.name
icon_icon = S.action_icon
desc = S.desc
button_icon = S.action_icon
button_icon_state = S.action_icon_state
background_icon_state = S.action_background_icon_state
button.name = name
+20
View File
@@ -929,6 +929,26 @@
manipulate_organs(C)
href_list["datumrefresh"] = href_list["editorgans"]
else if(href_list["hallucinate"])
if(!check_rights(0))
return
var/mob/living/carbon/C = locate(href_list["hallucinate"]) in GLOB.mob_list
if(!istype(C))
to_chat(usr, "This can only be done to instances of type /mob/living/carbon")
return
var/list/hallucinations = subtypesof(/datum/hallucination)
var/result = input(usr, "Choose the hallucination to apply","Send Hallucination") as null|anything in hallucinations
if(!usr)
return
if(QDELETED(C))
to_chat(usr, "Mob doesn't exist anymore")
return
if(result)
new result(C, TRUE)
else if(href_list["makehuman"])
if(!check_rights(R_SPAWN))
return
@@ -59,4 +59,4 @@ Bonus
else
if(prob(base_message_chance))
to_chat(M, "<span class='userdanger'>[pick("Oh, your head...", "Your head pounds.", "They're everywhere! Run!", "Something in the shadows...")]</span>")
M.hallucination += (15 * power)
M.hallucination += (45 * power)
+1 -1
View File
@@ -538,7 +538,7 @@ structure_check() searches for nearby cultist structures required for the invoca
mob_to_revive = input(user, "Choose a cultist to revive.", "Cultist to Revive") as null|anything in potential_revive_mobs
else
mob_to_revive = potential_revive_mobs[1]
if(!src || QDELETED(src) || rune_in_use || !validness_checks(mob_to_revive, user))
if(QDELETED(src) || !validness_checks(mob_to_revive, user))
rune_in_use = FALSE
return
if(user.name == "Herbert West")
+1 -1
View File
@@ -120,7 +120,7 @@
var/list/datum/game_mode/runnable_modes = config.get_runnable_midround_modes(living_crew.len)
var/list/datum/game_mode/usable_modes = list()
for(var/datum/game_mode/G in runnable_modes)
if(G.reroll_friendly)
if(G.reroll_friendly && living_crew >= G.required_players)
usable_modes += G
else
qdel(G)
+7 -3
View File
@@ -233,9 +233,13 @@
return
else /*if(src.justzap)*/
return
else if(user.hallucination > 50 && ishuman(user) && prob(10) && src.operating == FALSE)
hallucinate_shock(user)
return
else if(user.hallucinating() && ishuman(user) && prob(4) && !operating)
var/mob/living/carbon/human/H = user
if(H.gloves)
var/obj/item/clothing/gloves/G = H.gloves
if(G.siemens_coefficient)//not insulated
hallucinate_shock(H)
return
if (cyclelinkedairlock)
if (!shuttledocked && !emergency && !cyclelinkedairlock.shuttledocked && !cyclelinkedairlock.emergency && allowed(user))
if(cyclelinkedairlock.operating)
+1 -1
View File
@@ -127,7 +127,7 @@
var/pure_red = list(0,0,0,0,0,0,0,0,0,1,0,0)
spawn(0)
new /obj/effect/hallucination/delusion(victim.loc,victim,"demon",duration,0)
new /datum/hallucination/delusion(victim, TRUE, "demon",duration,0)
var/obj/item/weapon/twohanded/required/chainsaw/doomslayer/chainsaw = new(victim.loc)
chainsaw.flags |= NODROP
@@ -26,6 +26,7 @@
var/create_full = FALSE
var/create_with_tank = FALSE
var/igniter_type = /obj/item/device/assembly/igniter
trigger_guard = TRIGGER_GUARD_NORMAL
/obj/item/weapon/flamethrower/Destroy()
if(weldtool)
@@ -69,12 +70,7 @@
if(flag)
return // too close
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.dna.check_mutation(HULK))
to_chat(user, "<span class='warning'>Your meaty finger is much too large for the trigger guard!</span>")
return
if(NOGUNS in H.dna.species.species_traits)
to_chat(user, "<span class='warning'>Your fingers don't fit in the trigger guard!</span>")
if(!can_trigger_gun(user))
return
if(user && user.get_active_held_item() == src) // Make sure our user is still holding us
var/turf/target_turf = get_turf(target)
@@ -320,6 +320,8 @@
desc = "Particularly twisted dieties grant gifts of dubious value."
icon_state = "arm_blade"
item_state = "arm_blade"
lefthand_file = 'icons/mob/inhands/antag/changeling_lefthand.dmi'
righthand_file = 'icons/mob/inhands/antag/changeling_righthand.dmi'
flags = ABSTRACT | NODROP
w_class = WEIGHT_CLASS_HUGE
sharpness = IS_SHARP
@@ -26,6 +26,7 @@
var/fire_mode = PCANNON_FIREALL
var/automatic = FALSE
var/clumsyCheck = TRUE
trigger_guard = TRIGGER_GUARD_NORMAL
/obj/item/weapon/pneumatic_cannon/CanItemAutoclick()
return automatic
@@ -108,11 +109,7 @@
if(!istype(user) && !target)
return
var/discharge = 0
if(user.dna.check_mutation(HULK))
to_chat(user, "<span class='warning'>Your meaty finger is much too large for the trigger guard!</span>")
return
if(NOGUNS in user.dna.species.species_traits)
to_chat(user, "<span class='warning'>Your fingers don't fit in the trigger guard!</span>")
if(!can_trigger_gun(user))
return
if(!loadedItems || !loadedWeightClass)
to_chat(user, "<span class='warning'>\The [src] has nothing loaded.</span>")
@@ -1,4 +1,5 @@
/obj/item/weapon
var/trigger_guard = TRIGGER_GUARD_NONE
/obj/item/weapon/banhammer
desc = "A banhammer"
@@ -584,3 +585,8 @@
throwforce = 0
flags = DROPDEL | ABSTRACT
attack_verb = list("bopped")
/obj/item/weapon/proc/can_trigger_gun(mob/living/user)
if(!user.can_use_guns(src))
return FALSE
return TRUE
+36 -40
View File
@@ -1,12 +1,13 @@
/obj/structure/flora
resistance_flags = FLAMMABLE
obj_integrity = 150
max_integrity = 150
anchored = TRUE
anchored = 1
//trees
/obj/structure/flora/tree
name = "tree"
density = TRUE
density = 1
pixel_x = -16
layer = FLY_LAYER
var/cut = FALSE
@@ -25,7 +26,7 @@
playsound(get_turf(src), 'sound/effects/meteorimpact.ogg', 100 , 0, 0)
icon = 'icons/obj/flora/pinetrees.dmi'
icon_state = "tree_stump"
density = FALSE
density = 0
pixel_x = -16
name += " stump"
cut = TRUE
@@ -45,14 +46,14 @@
/obj/structure/flora/tree/pine/Initialize()
icon_state = "pine_[rand(1, 3)]"
..()
. = ..()
/obj/structure/flora/tree/pine/xmas
name = "xmas tree"
icon_state = "pine_c"
/obj/structure/flora/tree/pine/xmas/Initialize()
..()
. = ..()
icon_state = "pine_c"
/obj/structure/flora/tree/dead
@@ -64,7 +65,7 @@
icon_state = "palm1"
/obj/structure/flora/tree/palm/Initialize()
..()
. = ..()
icon_state = pick("palm1","palm2")
pixel_x = 0
@@ -76,7 +77,7 @@
/obj/structure/flora/tree/dead/Initialize()
icon_state = "tree_[rand(1, 6)]"
..()
. = ..()
/obj/structure/flora/tree/jungle
name = "tree"
@@ -88,12 +89,7 @@
/obj/structure/flora/tree/jungle/Initialize()
icon_state = "[icon_state][rand(1, 6)]"
..()
/obj/structure/flora/tree/jungle/small
pixel_y = 0
pixel_x = -32
icon = 'icons/obj/flora/jungletreesmall.dmi'
. = ..()
//grass
/obj/structure/flora/grass
@@ -106,7 +102,7 @@
/obj/structure/flora/grass/brown/Initialize()
icon_state = "snowgrass[rand(1, 3)]bb"
..()
. = ..()
/obj/structure/flora/grass/green
@@ -114,14 +110,14 @@
/obj/structure/flora/grass/green/Initialize()
icon_state = "snowgrass[rand(1, 3)]gb"
..()
. = ..()
/obj/structure/flora/grass/both
icon_state = "snowgrassall1"
/obj/structure/flora/grass/both/Initialize()
icon_state = "snowgrassall[rand(1, 3)]"
..()
. = ..()
//bushes
@@ -129,11 +125,11 @@
name = "bush"
icon = 'icons/obj/flora/snowflora.dmi'
icon_state = "snowbush1"
anchored = TRUE
anchored = 1
/obj/structure/flora/bush/Initialize()
icon_state = "snowbush[rand(1, 6)]"
..()
. = ..()
//newbushes
@@ -145,112 +141,112 @@
/obj/structure/flora/ausbushes/Initialize()
if(icon_state == "firstbush_1")
icon_state = "firstbush_[rand(1, 4)]"
..()
. = ..()
/obj/structure/flora/ausbushes/reedbush
icon_state = "reedbush_1"
/obj/structure/flora/ausbushes/reedbush/Initialize()
icon_state = "reedbush_[rand(1, 4)]"
..()
. = ..()
/obj/structure/flora/ausbushes/leafybush
icon_state = "leafybush_1"
/obj/structure/flora/ausbushes/leafybush/Initialize()
icon_state = "leafybush_[rand(1, 3)]"
..()
. = ..()
/obj/structure/flora/ausbushes/palebush
icon_state = "palebush_1"
/obj/structure/flora/ausbushes/palebush/Initialize()
icon_state = "palebush_[rand(1, 4)]"
..()
. = ..()
/obj/structure/flora/ausbushes/stalkybush
icon_state = "stalkybush_1"
/obj/structure/flora/ausbushes/stalkybush/Initialize()
icon_state = "stalkybush_[rand(1, 3)]"
..()
. = ..()
/obj/structure/flora/ausbushes/grassybush
icon_state = "grassybush_1"
/obj/structure/flora/ausbushes/grassybush/Initialize()
icon_state = "grassybush_[rand(1, 4)]"
..()
. = ..()
/obj/structure/flora/ausbushes/fernybush
icon_state = "fernybush_1"
/obj/structure/flora/ausbushes/fernybush/Initialize()
icon_state = "fernybush_[rand(1, 3)]"
..()
. = ..()
/obj/structure/flora/ausbushes/sunnybush
icon_state = "sunnybush_1"
/obj/structure/flora/ausbushes/sunnybush/Initialize()
icon_state = "sunnybush_[rand(1, 3)]"
..()
. = ..()
/obj/structure/flora/ausbushes/genericbush
icon_state = "genericbush_1"
/obj/structure/flora/ausbushes/genericbush/Initialize()
icon_state = "genericbush_[rand(1, 4)]"
..()
. = ..()
/obj/structure/flora/ausbushes/pointybush
icon_state = "pointybush_1"
/obj/structure/flora/ausbushes/pointybush/Initialize()
icon_state = "pointybush_[rand(1, 4)]"
..()
. = ..()
/obj/structure/flora/ausbushes/lavendergrass
icon_state = "lavendergrass_1"
/obj/structure/flora/ausbushes/lavendergrass/Initialize()
icon_state = "lavendergrass_[rand(1, 4)]"
..()
. = ..()
/obj/structure/flora/ausbushes/ywflowers
icon_state = "ywflowers_1"
/obj/structure/flora/ausbushes/ywflowers/Initialize()
icon_state = "ywflowers_[rand(1, 3)]"
..()
. = ..()
/obj/structure/flora/ausbushes/brflowers
icon_state = "brflowers_1"
/obj/structure/flora/ausbushes/brflowers/Initialize()
icon_state = "brflowers_[rand(1, 3)]"
..()
. = ..()
/obj/structure/flora/ausbushes/ppflowers
icon_state = "ppflowers_1"
/obj/structure/flora/ausbushes/ppflowers/Initialize()
icon_state = "ppflowers_[rand(1, 3)]"
..()
. = ..()
/obj/structure/flora/ausbushes/sparsegrass
icon_state = "sparsegrass_1"
/obj/structure/flora/ausbushes/sparsegrass/Initialize()
icon_state = "sparsegrass_[rand(1, 3)]"
..()
. = ..()
/obj/structure/flora/ausbushes/fullgrass
icon_state = "fullgrass_1"
/obj/structure/flora/ausbushes/fullgrass/Initialize()
icon_state = "fullgrass_[rand(1, 3)]"
..()
. = ..()
/obj/item/weapon/twohanded/required/kirbyplants
name = "potted plant"
@@ -308,10 +304,10 @@
desc = "A volcanic rock"
icon = 'icons/obj/flora/rocks.dmi'
resistance_flags = FIRE_PROOF
density = TRUE
density = 1
/obj/structure/flora/rock/Initialize()
..()
. = ..()
icon_state = "[icon_state][rand(1,3)]"
/obj/structure/flora/rock/pile
@@ -319,7 +315,7 @@
desc = "A pile of rocks"
/obj/structure/flora/rock/pile/Initialize()
..()
. = ..()
icon_state = "[icon_state][rand(1,3)]"
//Jungle grass
@@ -333,7 +329,7 @@
/obj/structure/flora/grass/jungle/Initialize()
icon_state = "[icon_state][rand(1, 5)]"
..()
. = ..()
/obj/structure/flora/grass/jungle/b
icon_state = "grassb"
@@ -348,7 +344,7 @@
density = FALSE
/obj/structure/flora/rock/jungle/Initialize()
..()
. = ..()
icon_state = "[initial(icon_state)][rand(1,5)]"
@@ -361,7 +357,7 @@
/obj/structure/flora/junglebush/Initialize()
icon_state = "[icon_state][rand(1, 3)]"
..()
. = ..()
/obj/structure/flora/junglebush/b
icon_state = "bushb"
+28
View File
@@ -0,0 +1,28 @@
diff a/code/game/objects/structures/flora.dm b/code/game/objects/structures/flora.dm (rejected hunks)
@@ -89,7 +89,7 @@
/obj/structure/flora/tree/jungle/Initialize()
icon_state = "[icon_state][rand(1, 6)]"
- ..()
+ . = ..()
//grass
/obj/structure/flora/grass
@@ -307,7 +307,7 @@
density = 1
/obj/structure/flora/rock/Initialize()
- ..()
+ . = ..()
icon_state = "[icon_state][rand(1,3)]"
/obj/structure/flora/rock/pile
@@ -381,5 +381,5 @@
pixel_y = -16
/obj/structure/flora/rock/pile/largejungle/Initialize()
- ..()
- icon_state = "[initial(icon_state)][rand(1,3)]"
\ No newline at end of file
+ . = ..()
+ icon_state = "[initial(icon_state)][rand(1,3)]"
+1
View File
@@ -18,6 +18,7 @@
var/sound
/turf/open/indestructible/sound/Entered(var/mob/AM)
..()
if(istype(AM))
playsound(src,sound,50,1)
+1
View File
@@ -22,6 +22,7 @@
return
/turf/open/chasm/Entered(atom/movable/AM)
..()
START_PROCESSING(SSobj, src)
drop_stuff(AM)
+1
View File
@@ -25,6 +25,7 @@
dir = EAST
/turf/open/space/transit/Entered(atom/movable/AM, atom/OldLoc)
..()
if(!locate(/obj/structure/lattice) in src)
throw_atom(AM)
+1
View File
@@ -160,6 +160,7 @@
return TRUE //Nothing found to block so return success!
/turf/Entered(atom/movable/AM)
..()
if(explosion_level && AM.ex_check(explosion_id))
AM.ex_act(explosion_level)
+1 -1
View File
@@ -5,7 +5,7 @@
F << "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
/client/proc/investigate_show(subject in list("hrefs","notes, memos, watchlist", INVESTIGATE_PORTAL, INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY) )
/client/proc/investigate_show(subject in list("hrefs","notes, memos, watchlist", INVESTIGATE_PORTAL, INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY, INVESTIGATE_HALLUCINATIONS) )
set name = "Investigate"
set category = "Admin"
if(!holder)
@@ -0,0 +1,10 @@
diff a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm (rejected hunks)
@@ -5,7 +5,7 @@
F << "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
-/client/proc/investigate_show(subject in list("hrefs","notes, memos, watchlist", INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY) )
+/client/proc/investigate_show(subject in list("hrefs","notes, memos, watchlist", INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY, INVESTIGATE_HALLUCINATIONS) )
set name = "Investigate"
set category = "Admin"
if(!holder)
+1 -1
View File
@@ -6,7 +6,7 @@
log_admin("[key_name(usr)] tried to use the admin panel without authorization.")
return
if(href_list["ahelp"])
if(!check_rights(R_ADMIN))
if(!check_rights(R_ADMIN, TRUE))
return
var/ahelp_ref = href_list["ahelp"]
@@ -189,8 +189,9 @@
#define CONNECTED 2
#define EMPTY 4
#define LOW 8
#define FULL 16
#define DANGER 32
#define MEDIUM 16
#define FULL 32
#define DANGER 64
/obj/machinery/portable_atmospherics/canister/update_icon()
if(stat & BROKEN)
cut_overlays()
@@ -207,9 +208,11 @@
var/pressure = air_contents.return_pressure()
if(pressure < 10)
update |= EMPTY
else if(pressure < ONE_ATMOSPHERE)
else if(pressure < 5 * ONE_ATMOSPHERE)
update |= LOW
else if(pressure < 15 * ONE_ATMOSPHERE)
else if(pressure < 10 * ONE_ATMOSPHERE)
update |= MEDIUM
else if(pressure < 40 * ONE_ATMOSPHERE)
update |= FULL
else
update |= DANGER
@@ -222,9 +225,9 @@
add_overlay("can-open")
if(update & CONNECTED)
add_overlay("can-connector")
if(update & EMPTY)
if(update & LOW)
add_overlay("can-o0")
else if(update & LOW)
else if(update & MEDIUM)
add_overlay("can-o1")
else if(update & FULL)
add_overlay("can-o2")
@@ -234,6 +237,7 @@
#undef CONNECTED
#undef EMPTY
#undef LOW
#undef MEDIUM
#undef FULL
#undef DANGER
+1 -1
View File
@@ -145,7 +145,7 @@
var/reason = ""
if(requestonly)
reason = stripped_input("Reason:", name, "") as text|null
reason = stripped_input("Reason:", name, "")
if(isnull(reason) || ..())
return
+10
View File
@@ -0,0 +1,10 @@
diff a/code/modules/cargo/console.dm b/code/modules/cargo/console.dm (rejected hunks)
@@ -145,7 +145,7 @@
var/reason = ""
if(requestonly)
- reason = stripped_input("Reason:", name, "") as text|null
+ reason = stripped_input("Reason:", name, "")
if(isnull(reason) || ..())
return
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -284,7 +284,7 @@
L.adjustBruteLoss(bonus_value)
/obj/item/crusher_trophy/tail_spike/proc/pushback(mob/living/target, mob/living/user)
if(!target.anchored || ismegafauna(target)) //megafauna will always be pushed
if(!QDELETED(target) && !QDELETED(user) && (!target.anchored || ismegafauna(target))) //megafauna will always be pushed
step(target, get_dir(user, target))
//bubblegum
+7
View File
@@ -240,6 +240,12 @@
/mob/living/carbon/is_muzzled()
return(istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
/mob/living/carbon/hallucinating()
if(hallucination)
return TRUE
else
return FALSE
/mob/living/carbon/resist_buckle()
if(restrained())
changeNext_move(CLICK_CD_BREAKOUT)
@@ -812,3 +818,4 @@
.["Make AI"] = "?_src_=vars;makeai=\ref[src]"
.["Modify bodypart"] = "?_src_=vars;editbodypart=\ref[src]"
.["Modify organs"] = "?_src_=vars;editorgans=\ref[src]"
.["Hallucinate"] = "?_src_=vars;hallucinate=\ref[src]"
@@ -143,7 +143,7 @@
var/protection = (prot["head"] + prot["arms"] + prot["feet"] + prot["legs"] + prot["groin"] + prot["chest"] + prot["hands"])/7
return protection
/mob/living/carbon/human/can_use_guns(var/obj/item/weapon/gun/G)
/mob/living/carbon/human/can_use_guns(var/obj/item/weapon/G)
. = ..()
if(G.trigger_guard == TRIGGER_GUARD_NORMAL)
+1 -2
View File
@@ -378,8 +378,7 @@
adjust_drugginess(-1)
if(hallucination)
spawn handle_hallucinations()
hallucination = max(hallucination-2,0)
handle_hallucinations()
//used in human and monkey handle_environment()
/mob/living/carbon/proc/natural_bodytemperature_stabilization()
@@ -140,7 +140,7 @@
return 0
return 1
/mob/living/carbon/monkey/can_use_guns(var/obj/item/weapon/gun/G)
/mob/living/carbon/monkey/can_use_guns(var/obj/item/weapon/G)
return 1
/mob/living/carbon/monkey/angry
+1 -1
View File
@@ -795,7 +795,7 @@
else
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
/mob/living/proc/can_use_guns(var/obj/item/weapon/gun/G)
/mob/living/proc/can_use_guns(var/obj/item/weapon/G)
if (G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser())
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
return 0
@@ -176,7 +176,7 @@
else
..()
/mob/living/simple_animal/drone/cogscarab/can_use_guns(obj/item/weapon/gun/G)
/mob/living/simple_animal/drone/cogscarab/can_use_guns(obj/item/weapon/G)
return GLOB.ratvar_awakens
/mob/living/simple_animal/drone/cogscarab/get_armor_effectiveness()
@@ -21,7 +21,7 @@
/mob/living/simple_animal/hostile/guardian/fire/AttackingTarget()
. = ..()
if(. && ishuman(target) && target != summoner)
new /obj/effect/hallucination/delusion(target.loc,target,"custom",200,0, icon_state,icon)
new /datum/hallucination/delusion(target,TRUE,"custom",200,0, icon_state,icon)
/mob/living/simple_animal/hostile/guardian/fire/Crossed(AM as mob|obj)
..()
@@ -57,6 +57,7 @@ Difficulty: Hard
ranged_cooldown_time = 40
aggro_vision_range = 21 //so it can see to one side of the arena to the other
loot = list(/obj/item/weapon/hierophant_club)
crusher_loot = list(/obj/item/weapon/hierophant_club)
wander = FALSE
var/burst_range = 3 //range on burst aoe
var/beam_range = 5 //range on cross blast beams
+3
View File
@@ -325,6 +325,9 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
return B.eye_blind
return 0
/mob/proc/hallucinating()
return FALSE
/proc/is_special_character(mob/M) // returns 1 for special characters and 2 for heroes of gamemode //moved out of admins.dm because things other than admin procs were calling this.
if(!SSticker.HasRoundStarted())
return 0
+2 -2
View File
@@ -120,8 +120,8 @@
if(auto_name)
name = "\improper [get_area(src)] APC"
pixel_x = (src.tdir & 3)? 0 : (src.tdir == 4 ? 24 : -24)
pixel_y = (src.tdir & 3)? (src.tdir ==1 ? 24 : -24) : 0
pixel_x = (src.tdir & 3)? 0 : (src.tdir == 4 ? 24 : -25)
pixel_y = (src.tdir & 3)? (src.tdir ==1 ? 23 : -24) : 0
if (building)
area = get_area(src)
opened = 1
+5 -7
View File
@@ -27,7 +27,7 @@
var/recoil = 0 //boom boom shake the room
var/clumsy_check = 1
var/obj/item/ammo_casing/chambered = null
var/trigger_guard = TRIGGER_GUARD_NORMAL //trigger guard on the weapon, hulks can't fire them with their big meaty fingers
trigger_guard = TRIGGER_GUARD_NORMAL //trigger guard on the weapon, hulks can't fire them with their big meaty fingers
var/sawn_desc = null //description change if weapon is sawn-off
var/sawn_state = SAWN_INTACT
var/burst_size = 1 //how large a burst is
@@ -188,12 +188,10 @@
/obj/item/weapon/gun/proc/can_trigger_gun(var/mob/living/user)
if(!handle_pins(user) || !user.can_use_guns(src))
return 0
return 1
/obj/item/weapon/gun/can_trigger_gun(mob/living/user)
. = ..()
if(!handle_pins(user))
return FALSE
/obj/item/weapon/gun/proc/handle_pins(mob/living/user)
if(pin)
@@ -387,3 +387,232 @@
var/obj/effect/ebeam/B = b
animate(B, alpha = 0, time = 32)
return ..()
/obj/item/projectile/hallucination
name = "bullet"
icon = null
icon_state = null
hitsound = ""
suppressed = TRUE
ricochets_max = 0
ricochet_chance = 0
damage = 0
nodamage = TRUE
projectile_type = /obj/item/projectile/hallucination
log_override = TRUE
var/hal_icon_state
var/image/fake_icon
var/mob/living/carbon/hal_target
var/hal_fire_sound
var/hal_hitsound
var/hal_hitsound_wall
var/hal_impact_effect
var/hal_impact_effect_wall
var/hit_duration
var/hit_duration_wall
/obj/item/projectile/hallucination/fire()
..()
fake_icon = image('icons/obj/projectiles.dmi', src, hal_icon_state, ABOVE_MOB_LAYER)
if(hal_target.client)
hal_target.client.images += fake_icon
/obj/item/projectile/hallucination/Destroy()
if(hal_target.client)
hal_target.client.images -= fake_icon
QDEL_NULL(fake_icon)
return ..()
/obj/item/projectile/hallucination/Collide(atom/A)
if(!ismob(A))
if(hal_hitsound_wall)
hal_target.playsound_local(loc, hal_hitsound_wall, 40, 1)
if(hal_impact_effect_wall)
spawn_hit(A, TRUE)
else if(A == hal_target)
if(hal_hitsound)
hal_target.playsound_local(A, hal_hitsound, 100, 1)
target_on_hit(A)
qdel(src)
return TRUE
/obj/item/projectile/hallucination/proc/target_on_hit(mob/M)
if(M == hal_target)
to_chat(hal_target, "<span class='userdanger'>[M] is hit by \a [src] in the chest!</span>")
hal_apply_effect()
else if(M in view(hal_target))
to_chat(hal_target, "<span class='danger'>[M] is hit by \a [src] in the chest!!</span>")
if(damage_type == BRUTE)
var/splatter_dir = dir
if(starting)
splatter_dir = get_dir(starting, get_turf(M))
spawn_blood(M, splatter_dir)
else if(hal_impact_effect)
spawn_hit(M, FALSE)
/obj/item/projectile/hallucination/proc/spawn_blood(mob/M, set_dir)
set waitfor = 0
if(!hal_target.client)
return
var/splatter_icon_state
if(set_dir in GLOB.diagonals)
splatter_icon_state = "splatter[pick(1, 2, 6)]"
else
splatter_icon_state = "splatter[pick(3, 4, 5)]"
var/image/blood = image('icons/effects/blood.dmi', M, splatter_icon_state, ABOVE_MOB_LAYER)
var/target_pixel_x = 0
var/target_pixel_y = 0
switch(set_dir)
if(NORTH)
target_pixel_y = 16
if(SOUTH)
target_pixel_y = -16
layer = ABOVE_MOB_LAYER
if(EAST)
target_pixel_x = 16
if(WEST)
target_pixel_x = -16
if(NORTHEAST)
target_pixel_x = 16
target_pixel_y = 16
if(NORTHWEST)
target_pixel_x = -16
target_pixel_y = 16
if(SOUTHEAST)
target_pixel_x = 16
target_pixel_y = -16
layer = ABOVE_MOB_LAYER
if(SOUTHWEST)
target_pixel_x = -16
target_pixel_y = -16
layer = ABOVE_MOB_LAYER
hal_target.client.images += blood
animate(blood, pixel_x = target_pixel_x, pixel_y = target_pixel_y, alpha = 0, time = 5)
sleep(5)
hal_target.client.images -= blood
qdel(blood)
/obj/item/projectile/hallucination/proc/spawn_hit(atom/A, is_wall)
set waitfor = 0
if(!hal_target.client)
return
var/image/hit_effect = image('icons/effects/blood.dmi', A, is_wall ? hal_impact_effect_wall : hal_impact_effect, ABOVE_MOB_LAYER)
hit_effect.pixel_x = A.pixel_x + rand(-4,4)
hit_effect.pixel_y = A.pixel_y + rand(-4,4)
hal_target.client.images += hit_effect
sleep(is_wall ? hit_duration_wall : hit_duration)
hal_target.client.images -= hit_effect
qdel(hit_effect)
/obj/item/projectile/hallucination/proc/hal_apply_effect()
return
/obj/item/projectile/hallucination/bullet
name = "bullet"
hal_icon_state = "bullet"
hal_fire_sound = "gunshot"
hal_hitsound = 'sound/weapons/pierce.ogg'
hal_hitsound_wall = "ricochet"
hal_impact_effect = "impact_bullet"
hal_impact_effect_wall = "impact_bullet"
hit_duration = 5
hit_duration_wall = 5
/obj/item/projectile/hallucination/bullet/hal_apply_effect()
hal_target.adjustStaminaLoss(60)
/obj/item/projectile/hallucination/laser
name = "laser"
damage_type = BURN
hal_icon_state = "laser"
hal_fire_sound = 'sound/weapons/laser.ogg'
hal_hitsound = 'sound/weapons/sear.ogg'
hal_hitsound_wall = 'sound/weapons/effects/searwall.ogg'
hal_impact_effect = "impact_laser"
hal_impact_effect_wall = "impact_laser_wall"
hit_duration = 4
hit_duration_wall = 10
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
/obj/item/projectile/hallucination/laser/hal_apply_effect()
hal_target.adjustStaminaLoss(20)
hal_target.blur_eyes(2)
/obj/item/projectile/hallucination/taser
name = "electrode"
damage_type = BURN
hal_icon_state = "spark"
color = "#FFFF00"
hal_fire_sound = 'sound/weapons/taser.ogg'
hal_hitsound = 'sound/weapons/taserhit.ogg'
hal_hitsound_wall = null
hal_impact_effect = null
hal_impact_effect_wall = null
/obj/item/projectile/hallucination/taser/hal_apply_effect()
hal_target.Knockdown(100)
hal_target.stuttering += 20
if(hal_target.dna && hal_target.dna.check_mutation(HULK))
hal_target.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
else if(hal_target.status_flags & CANKNOCKDOWN)
addtimer(CALLBACK(hal_target, /mob/living/carbon.proc/do_jitter_animation, 20), 5)
/obj/item/projectile/hallucination/disabler
name = "disabler beam"
damage_type = STAMINA
hal_icon_state = "omnilaser"
hal_fire_sound = 'sound/weapons/taser2.ogg'
hal_hitsound = 'sound/weapons/tap.ogg'
hal_hitsound_wall = 'sound/weapons/effects/searwall.ogg'
hal_impact_effect = "impact_laser_blue"
hal_impact_effect_wall = null
hit_duration = 4
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
/obj/item/projectile/hallucination/disabler/hal_apply_effect()
hal_target.adjustStaminaLoss(25)
/obj/item/projectile/hallucination/ebow
name = "bolt"
damage_type = TOX
hal_icon_state = "cbbolt"
hal_fire_sound = 'sound/weapons/genhit.ogg'
hal_hitsound = null
hal_hitsound_wall = null
hal_impact_effect = null
hal_impact_effect_wall = null
/obj/item/projectile/hallucination/ebow/hal_apply_effect()
hal_target.Knockdown(100)
hal_target.stuttering += 5
hal_target.adjustStaminaLoss(8)
/obj/item/projectile/hallucination/change
name = "bolt of change"
damage_type = BURN
hal_icon_state = "ice_1"
hal_fire_sound = 'sound/magic/staff_change.ogg'
hal_hitsound = null
hal_hitsound_wall = null
hal_impact_effect = null
hal_impact_effect_wall = null
/obj/item/projectile/hallucination/change/hal_apply_effect()
new /datum/hallucination/self_delusion(hal_target, TRUE, wabbajack = FALSE)
/obj/item/projectile/hallucination/death
name = "bolt of death"
damage_type = BURN
hal_icon_state = "pulse1_bl"
hal_fire_sound = 'sound/magic/wandodeath.ogg'
hal_hitsound = null
hal_hitsound_wall = null
hal_impact_effect = null
hal_impact_effect_wall = null
/obj/item/projectile/hallucination/death/hal_apply_effect()
new /datum/hallucination/death(hal_target, TRUE)
@@ -101,9 +101,11 @@
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "chem_dispenser", name, 550, 550, master_ui, state)
if(user.hallucinating())
ui.set_autoupdate(FALSE) //to not ruin the immersion by constantly changing the fake chemicals
ui.open()
/obj/machinery/chem_dispenser/ui_data()
/obj/machinery/chem_dispenser/ui_data(mob/user)
var/data = list()
data["amount"] = amount
data["energy"] = cell.charge ? cell.charge * powerefficiency : "0" //To prevent NaN in the UI.
@@ -128,10 +130,16 @@
data["beakerTransferAmounts"] = null
var chemicals[0]
var/is_hallucinating = FALSE
if(user.hallucinating())
is_hallucinating = TRUE
for(var/re in dispensable_reagents)
var/datum/reagent/temp = GLOB.chemical_reagents_list[re]
if(temp)
chemicals.Add(list(list("title" = temp.name, "id" = temp.id)))
var/chemname = temp.name
if(is_hallucinating && prob(5))
chemname = "[pick_list_replacements("hallucination.json", "chemicals")]"
chemicals.Add(list(list("title" = chemname, "id" = temp.id)))
data["chemicals"] = chemicals
return data
+2 -3
View File
@@ -290,9 +290,8 @@
//HALLUCINATE
else if((findtext(message, hallucinate_words)))
cooldown = COOLDOWN_MEME
for(var/V in listeners)
var/mob/living/L = V
new /obj/effect/hallucination/delusion(get_turf(L),L,null,150 * power_multiplier,0)
for(var/mob/living/carbon/C in listeners)
new /datum/hallucination/delusion(C, TRUE, null,150 * power_multiplier,0)
//WAKE UP
else if((findtext(message, wakeup_words)))
+10 -10
View File
@@ -59,16 +59,16 @@
if(config.sql_enabled)
if(SSdbcore.Connect())
log_world("Database connection established.")
var/datum/DBQuery/db_version = SSdbcore.NewQuery("SELECT major, minor FROM [format_table_name("schema_version")]")
db_version.Execute()
if(db_version.NextRow())
var/db_major = db_version.item[1]
var/db_minor = db_version.item[2]
var/datum/DBQuery/query_db_version = SSdbcore.NewQuery("SELECT major, minor FROM [format_table_name("schema_version")] ORDER BY date DESC LIMIT 1")
query_db_version.Execute()
if(query_db_version.NextRow())
var/db_major = query_db_version.item[1]
var/db_minor = query_db_version.item[2]
if(db_major < DB_MAJOR_VERSION || db_minor < DB_MINOR_VERSION)
message_admins("db schema ([db_major].[db_minor]) is behind latest tg schema version ([DB_MAJOR_VERSION].[DB_MINOR_VERSION]), this may lead to undefined behaviour or errors")
log_sql("db schema ([db_major].[db_minor]) is behind latest tg schema version ([DB_MAJOR_VERSION].[DB_MINOR_VERSION]), this may lead to undefined behaviour or errors")
message_admins("Database schema ([db_major].[db_minor]) is behind latest schema version ([DB_MAJOR_VERSION].[DB_MINOR_VERSION]), this may lead to undefined behaviour or errors")
log_sql("Database schema ([db_major].[db_minor]) is behind latest schema version ([DB_MAJOR_VERSION].[DB_MINOR_VERSION]), this may lead to undefined behaviour or errors")
else
message_admins("Could not get schema version from db")
message_admins("Could not get schema version from database")
else
log_world("Your server failed to establish a connection with the database.")
@@ -105,10 +105,10 @@
/world/Topic(T, addr, master, key)
var/list/input = params2list(T)
var/pinging = ("ping" in input)
var/playing = ("players" in input)
if(!pinging && !playing && config && config.log_world_topic)
GLOB.world_game_log << "TOPIC: \"[T]\", from:[addr], master:[master], key:[key]"