mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-11 16:08:32 +01:00
Revert "Merge branch 'punishesarchie' of https://github.com/MalricB/Hyper-Station-13 into punishesarchie"
This reverts commit1945c166b4, reversing changes made toc8d20ea83c.
This commit is contained in:
@@ -158,6 +158,15 @@
|
||||
else
|
||||
owner.crit_threshold -= (holdmyinsanityeffect - insanity_effect)
|
||||
|
||||
if(HAS_TRAIT(owner, TRAIT_DEPRESSION))
|
||||
if(prob(0.05))
|
||||
add_event(null, "depression", /datum/mood_event/depression)
|
||||
clear_event(null, "jolly")
|
||||
if(HAS_TRAIT(owner, TRAIT_JOLLY))
|
||||
if(prob(0.05))
|
||||
add_event(null, "jolly", /datum/mood_event/jolly)
|
||||
clear_event(null, "depression")
|
||||
|
||||
holdmyinsanityeffect = insanity_effect
|
||||
|
||||
HandleNutrition(owner)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
if(isliving(parent))
|
||||
host_mob = parent
|
||||
|
||||
if(MOB_SILICON in host_mob.mob_biotypes) //Shouldn't happen, but this avoids HUD runtimes in case a silicon gets them somehow.
|
||||
if(!(MOB_ORGANIC in host_mob.mob_biotypes) && !(MOB_UNDEAD in host_mob.mob_biotypes)) //Shouldn't happen, but this avoids HUD runtimes in case a silicon gets them somehow.
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
host_mob.hud_set_nanite_indicator()
|
||||
@@ -53,6 +53,7 @@
|
||||
RegisterSignal(parent, COMSIG_MOB_ALLOWED, .proc/check_access)
|
||||
RegisterSignal(parent, COMSIG_LIVING_ELECTROCUTE_ACT, .proc/on_shock)
|
||||
RegisterSignal(parent, COMSIG_LIVING_MINOR_SHOCK, .proc/on_minor_shock)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_HEAR, .proc/on_hear)
|
||||
RegisterSignal(parent, COMSIG_SPECIES_GAIN, .proc/check_viable_biotype)
|
||||
RegisterSignal(parent, COMSIG_NANITE_SIGNAL, .proc/receive_signal)
|
||||
|
||||
@@ -190,13 +191,18 @@
|
||||
var/datum/nanite_program/NP = X
|
||||
NP.on_death(gibbed)
|
||||
|
||||
/datum/component/nanites/proc/on_hear(datum/source, message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
for(var/X in programs)
|
||||
var/datum/nanite_program/NP = X
|
||||
NP.on_hear(message, speaker, message_language, raw_message, radio_freq, spans, message_mode)
|
||||
|
||||
/datum/component/nanites/proc/receive_signal(datum/source, code, source = "an unidentified source")
|
||||
for(var/X in programs)
|
||||
var/datum/nanite_program/NP = X
|
||||
NP.receive_signal(code, source)
|
||||
|
||||
/datum/component/nanites/proc/check_viable_biotype()
|
||||
if((MOB_SILICON in host_mob.mob_biotypes))
|
||||
if(!(MOB_ORGANIC in host_mob.mob_biotypes) && !(MOB_UNDEAD in host_mob.mob_biotypes))
|
||||
qdel(src) //bodytype no longer sustains nanites
|
||||
|
||||
/datum/component/nanites/proc/check_access(datum/source, obj/O)
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
move_react()
|
||||
|
||||
/datum/component/orbiter/proc/begin_orbit(atom/movable/orbiter, radius, clockwise, rotation_speed, rotation_segments, pre_rotation)
|
||||
SEND_SIGNAL(parent, COMSIG_ATOM_ORBIT_BEGIN, orbiter, radius, clockwise, rotation_speed, rotation_segments, pre_rotation)
|
||||
if(orbiter.orbiting)
|
||||
if(orbiter.orbiting == src)
|
||||
orbiter.orbiting.end_orbit(orbiter, TRUE)
|
||||
@@ -100,7 +99,6 @@
|
||||
/datum/component/orbiter/proc/end_orbit(atom/movable/orbiter, refreshing=FALSE)
|
||||
if(!orbiters[orbiter])
|
||||
return
|
||||
SEND_SIGNAL(parent, COMSIG_ATOM_ORBIT_END, orbiter, refreshing)
|
||||
UnregisterSignal(orbiter, COMSIG_MOVABLE_MOVED)
|
||||
orbiter.SpinAnimation(0, 0)
|
||||
orbiters -= orbiter
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
|
||||
//KEYS
|
||||
/datum/component/riding/proc/keycheck(mob/user)
|
||||
return !keytype || user?.is_holding_item_of_type(keytype)
|
||||
return !keytype || user.is_holding_item_of_type(keytype)
|
||||
|
||||
//BUCKLE HOOKS
|
||||
/datum/component/riding/proc/restore_position(mob/living/buckled_mob)
|
||||
@@ -150,7 +150,7 @@
|
||||
|
||||
/datum/component/riding/proc/handle_ride(mob/user, direction)
|
||||
var/atom/movable/AM = parent
|
||||
if(user && user.incapacitated())
|
||||
if(user.incapacitated())
|
||||
Unbuckle(user)
|
||||
return
|
||||
|
||||
|
||||
@@ -106,7 +106,6 @@
|
||||
if(!can_be_rotated.Invoke(user, rotation) || !can_user_rotate.Invoke(user, rotation))
|
||||
return
|
||||
BaseRot(user, rotation)
|
||||
return TRUE
|
||||
|
||||
/datum/component/simple_rotation/proc/WrenchRot(datum/source, obj/item/I, mob/living/user)
|
||||
if(!can_be_rotated.Invoke(user,default_rotation_direction) || !can_user_rotate.Invoke(user,default_rotation_direction))
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
if(!ismovableatom(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_Z_CHANGED), .proc/check_in_bounds)
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_SECLUDED_LOCATION), .proc/relocate)
|
||||
RegisterSignal(parent, list(COMSIG_PARENT_PREQDELETED), .proc/check_deletion)
|
||||
RegisterSignal(parent, list(COMSIG_ITEM_IMBUE_SOUL), .proc/check_soul_imbue)
|
||||
src.inform_admins = inform_admins
|
||||
@@ -33,7 +32,6 @@
|
||||
|
||||
var/atom/movable/AM = parent
|
||||
AM.forceMove(targetturf)
|
||||
to_chat(get(parent, /mob), "<span class='danger'>You can't help but feel that you just lost something back there...</span>")
|
||||
// move the disc, so ghosts remain orbiting it even if it's "destroyed"
|
||||
return targetturf
|
||||
|
||||
@@ -42,6 +40,7 @@
|
||||
return
|
||||
else
|
||||
var/turf/currentturf = get_turf(src)
|
||||
to_chat(get(parent, /mob), "<span class='danger'>You can't help but feel that you just lost something back there...</span>")
|
||||
var/turf/targetturf = relocate()
|
||||
log_game("[parent] has been moved out of bounds in [loc_name(currentturf)]. Moving it to [loc_name(targetturf)].")
|
||||
if(inform_admins)
|
||||
|
||||
@@ -43,26 +43,6 @@
|
||||
/datum/component/storage/concrete/pockets/small/detective
|
||||
attack_hand_interact = TRUE // so the detectives would discover pockets in their hats
|
||||
|
||||
/datum/component/storage/concrete/pockets/chefhat
|
||||
attack_hand_interact = TRUE
|
||||
max_items = 1
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/datum/component/storage/concrete/pockets/chefhat/Initialize()
|
||||
. = ..()
|
||||
can_hold = typecacheof(list(
|
||||
/obj/item/clothing/head/mob_holder,
|
||||
/obj/item/reagent_containers/food/snacks/deadmouse
|
||||
))
|
||||
|
||||
/datum/component/storage/concrete/pockets/chefhat/can_be_inserted(obj/item/I, stop_messages, mob/M)
|
||||
. = ..()
|
||||
if(istype(I,/obj/item/clothing/head/mob_holder))
|
||||
var/obj/item/clothing/head/mob_holder/mausholder = I
|
||||
if(locate(/mob/living/simple_animal/mouse) in mausholder.contents)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
/datum/component/storage/concrete/pockets/shoes
|
||||
attack_hand_interact = FALSE
|
||||
quickdraw = TRUE
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,104 +0,0 @@
|
||||
/**
|
||||
* Observers voting on things through orbiting
|
||||
*/
|
||||
/datum/component/twitch_plays
|
||||
/// Observers
|
||||
var/list/mob/players = list()
|
||||
|
||||
/datum/component/twitch_plays/Initialize(...)
|
||||
. = ..()
|
||||
if(!isatom(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(parent, COMSIG_ATOM_ORBIT_BEGIN, .proc/on_start_orbit)
|
||||
RegisterSignal(parent, COMSIG_ATOM_ORBIT_END, .proc/on_end_orbit)
|
||||
|
||||
/datum/component/twitch_plays/Destroy(force, silent)
|
||||
for(var/i in players)
|
||||
DetachPlayer(i)
|
||||
return ..()
|
||||
|
||||
/datum/component/twitch_plays/proc/on_start_orbit(datum/source, atom/movable/orbiter)
|
||||
if(!isobserver(orbiter))
|
||||
return
|
||||
AttachPlayer(orbiter)
|
||||
|
||||
/datum/component/twitch_plays/proc/on_end_orbit(datum/source, atom/movable/orbiter)
|
||||
if(!(orbiter in players))
|
||||
return
|
||||
DetachPlayer(orbiter)
|
||||
|
||||
/datum/component/twitch_plays/proc/AttachPlayer(mob/dead/observer)
|
||||
players |= observer
|
||||
RegisterSignal(observer, COMSIG_PARENT_QDELETING, .proc/on_end_orbit)
|
||||
|
||||
/datum/component/twitch_plays/proc/DetachPlayer(mob/dead/observer)
|
||||
players -= observer
|
||||
UnregisterSignal(observer, COMSIG_PARENT_QDELETING)
|
||||
|
||||
/// Simple movement one
|
||||
/datum/component/twitch_plays/simple_movement
|
||||
/// Movement votes by observer
|
||||
var/list/votes = list()
|
||||
/// Allow diagonals
|
||||
var/allow_diagonal = FALSE
|
||||
|
||||
/datum/component/twitch_plays/simple_movement/Initialize(...)
|
||||
. = ..()
|
||||
if(. & COMPONENT_INCOMPATIBLE)
|
||||
return
|
||||
RegisterSignal(parent, COMSIG_TWITCH_PLAYS_MOVEMENT_DATA, .proc/fetch_data)
|
||||
|
||||
/datum/component/twitch_plays/simple_movement/AttachPlayer(mob/dead/observer)
|
||||
. = ..()
|
||||
RegisterSignal(observer, COMSIG_MOVABLE_PRE_MOVE, .proc/pre_move)
|
||||
|
||||
/datum/component/twitch_plays/simple_movement/DetachPlayer(mob/dead/observer)
|
||||
. = ..()
|
||||
UnregisterSignal(observer, COMSIG_MOVABLE_PRE_MOVE)
|
||||
|
||||
/datum/component/twitch_plays/simple_movement/proc/pre_move(datum/source, turf/newLoc)
|
||||
if(get_dist(newLoc, parent) > 1) // they're trying to escape orbit
|
||||
return
|
||||
. = COMPONENT_MOVABLE_BLOCK_PRE_MOVE
|
||||
var/dir = get_dir(parent, newLoc)
|
||||
if(!dir)
|
||||
return
|
||||
if(allow_diagonal || !((dir - 1) & dir))
|
||||
votes[source] = dir
|
||||
else // pick one or the other
|
||||
votes[source] = prob(50)? (dir & ~(dir - 1)) : (dir & (dir - 1))
|
||||
|
||||
/datum/component/twitch_plays/simple_movement/proc/fetch_data(datum/source, wipe_votes)
|
||||
if(!votes.len)
|
||||
return
|
||||
var/list/total = list(TEXT_NORTH, TEXT_SOUTH, TEXT_EAST, TEXT_WEST)
|
||||
for(var/i in votes)
|
||||
total[num2text(votes[i])] += 1
|
||||
. = text2num(pickweight(total, 0))
|
||||
if(wipe_votes)
|
||||
votes.len = 0
|
||||
|
||||
/datum/component/twitch_plays/simple_movement/auto
|
||||
var/move_delay = 2
|
||||
var/last_move = 0
|
||||
|
||||
/datum/component/twitch_plays/simple_movement/auto/Initialize(...)
|
||||
if(!ismovable(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
. = ..()
|
||||
if(. & COMPONENT_INCOMPATIBLE)
|
||||
return
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
|
||||
/datum/component/twitch_plays/simple_movement/auto/Destroy(force, silent)
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
return ..()
|
||||
|
||||
/datum/component/twitch_plays/simple_movement/auto/process()
|
||||
var/dir = fetch_data(null, TRUE)
|
||||
if(!dir)
|
||||
return
|
||||
if(world.time < (last_move + move_delay))
|
||||
return
|
||||
last_move = world.time
|
||||
step(parent, dir)
|
||||
@@ -25,8 +25,6 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
var/unlock_code
|
||||
var/failsafe_code
|
||||
var/datum/ui_state/checkstate
|
||||
var/compact_mode = FALSE
|
||||
var/debug = FALSE
|
||||
|
||||
/datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, datum/game_mode/_gamemode, starting_tc = 20, datum/ui_state/_checkstate)
|
||||
if(!isitem(parent))
|
||||
@@ -123,7 +121,7 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
active = TRUE
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "uplink", name, 620, 580, master_ui, state)
|
||||
ui = new(user, src, ui_key, "uplink", name, 450, 750, master_ui, state)
|
||||
ui.set_autoupdate(FALSE) // This UI is only ever opened by one person, and never is updated outside of user input.
|
||||
ui.set_style("syndicate")
|
||||
ui.open()
|
||||
@@ -140,35 +138,29 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
var/list/data = list()
|
||||
data["telecrystals"] = telecrystals
|
||||
data["lockable"] = lockable
|
||||
data["compact_mode"] = compact_mode
|
||||
|
||||
return data
|
||||
|
||||
/datum/component/uplink/ui_static_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["categories"] = list()
|
||||
for(var/category in uplink_items)
|
||||
var/list/cat = list(
|
||||
"name" = category,
|
||||
"items" = (category == selected_cat ? list() : null))
|
||||
for(var/item in uplink_items[category])
|
||||
var/datum/uplink_item/I = uplink_items[category][item]
|
||||
if(I.limited_stock == 0)
|
||||
continue
|
||||
if(I.restricted_roles.len)
|
||||
var/is_inaccessible = TRUE
|
||||
for(var/R in I.restricted_roles)
|
||||
if(R == user.mind.assigned_role || debug)
|
||||
is_inaccessible = FALSE
|
||||
if(is_inaccessible)
|
||||
if(category == selected_cat)
|
||||
for(var/item in uplink_items[category])
|
||||
var/datum/uplink_item/I = uplink_items[category][item]
|
||||
if(I.limited_stock == 0)
|
||||
continue
|
||||
if(I.restricted_roles.len)
|
||||
var/is_inaccessible = 1
|
||||
for(var/R in I.restricted_roles)
|
||||
if(R == user.mind.assigned_role)
|
||||
is_inaccessible = 0
|
||||
if(is_inaccessible)
|
||||
continue
|
||||
cat["items"] += list(list(
|
||||
"name" = I.name,
|
||||
"cost" = I.cost,
|
||||
"desc" = I.desc,
|
||||
))
|
||||
cat["items"] += list(list(
|
||||
"name" = I.name,
|
||||
"cost" = I.cost,
|
||||
"desc" = I.desc,
|
||||
))
|
||||
data["categories"] += list(cat)
|
||||
return data
|
||||
|
||||
@@ -196,8 +188,6 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
SStgui.close_uis(src)
|
||||
if("select")
|
||||
selected_cat = params["category"]
|
||||
if("compact_toggle")
|
||||
compact_mode = !compact_mode
|
||||
return TRUE
|
||||
|
||||
/datum/component/uplink/proc/MakePurchase(mob/user, datum/uplink_item/U)
|
||||
|
||||
Reference in New Issue
Block a user